-
Notifications
You must be signed in to change notification settings - Fork 82
80 lines (72 loc) · 2.65 KB
/
bleeding.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
on:
workflow_dispatch:
push:
branches:
- 'versions/**'
name: Publish bleeding export
jobs:
publish:
name: Publish export
runs-on: ubuntu-latest
outputs:
CI_VERSION: ${{ steps.info.outputs.CI_VERSION }}
CI_GROUP: ${{ steps.info.outputs.CI_GROUP }}
CI_ARTIFACT: ${{ steps.info.outputs.CI_ARTIFACT }}
CI_GAME_VERSION: ${{ steps.info.outputs.CI_GAME_VERSION }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Obtain GAV info
id: info
run: ./gradlew --quiet -PreleaseType=bleeding printGHActionsOutput >> "$GITHUB_OUTPUT"
- name: Publish export
run: ./gradlew publishExport -PreleaseType=bleeding
env:
LDTTeamJfrogUsername: ${{ secrets.PUBLISHING_USERNAME }}
LDTTeamJfrogPassword: ${{ secrets.PUBLISHING_PASSWORD }}
announce:
name: Send announcement message
needs: publish
runs-on: ubuntu-latest
steps:
- name: Download discord.sh
run: curl -LOJ https://github.com/fieu/discord.sh/releases/download/v2.0.0/discord.sh
- name: Set discord.sh executable
run: chmod +x discord.sh
- name: Send announcement message
run: |
./discord.sh \
--webhook-url="$WEBHOOK" \
--username "ParchmentMC" \
--color "0xFF0000" \
--title "New bleeding for \`$CI_GAME_VERSION\`!" \
--field "Version;\`$CI_VERSION\`;false" \
--field "Group;\`$CI_GROUP\`;true" \
--field "Artifact;\`$CI_ARTIFACT\`;true" \
--field "Coordinate;\`$CI_GROUP:$CI_ARTIFACT:$CI_VERSION\`;false" \
--timestamp
env:
WEBHOOK: ${{ secrets.BLEEDING_DISCORD_WEBHOOK }}
CI_VERSION: ${{ needs.publish.outputs.CI_VERSION }}
CI_GROUP: ${{ needs.publish.outputs.CI_GROUP }}
CI_ARTIFACT: ${{ needs.publish.outputs.CI_ARTIFACT }}
CI_GAME_VERSION: ${{ needs.publish.outputs.CI_GAME_VERSION }}
set-variables:
name: Set repository variables
needs: publish
runs-on: ubuntu-latest
steps:
- name: Mark pending variables
run: |
gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_NIGHTLY --body "true"
gh -R $GITHUB_SERVER_URL/$GITHUB_REPOSITORY variable set HAS_PENDING_RELEASE --body "true"
env:
# This should be a GH PAT with 'repo' scope
GH_TOKEN: ${{ secrets.VARIABLES_GH_TOKEN }}