Skip to content

Commit 42dc1e1

Browse files
Merge pull request #222 from LifeIsAParadox/patch-workflow
Patch workflow
2 parents a3eff36 + ea7de7a commit 42dc1e1

File tree

2 files changed

+24
-21
lines changed

2 files changed

+24
-21
lines changed

.github/workflows/beta.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
# Steps represent a sequence of tasks that will be executed as part of the job
1616
steps:
1717
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1919

20-
- uses: actions/github-script@v2
20+
- uses: actions/github-script@v6
2121
with:
2222
result-encoding: string
2323
script: |
@@ -27,9 +27,9 @@ jobs:
2727
fs.writeFileSync("./gradle.properties", file);
2828
2929
- name: Set up JDK 17
30-
uses: actions/setup-java@v2
30+
uses: actions/setup-java@v3
3131
with:
32-
distribution: 'adopt'
32+
distribution: 'microsoft'
3333
java-version: '17'
3434

3535
- name: Grant execute permission for gradlew
@@ -38,15 +38,15 @@ jobs:
3838
- name: Build with Gradle
3939
run: ./gradlew build
4040

41-
- uses: actions/github-script@v2
41+
- uses: actions/github-script@v6
4242
id: fname
4343
with:
4444
result-encoding: string
4545
script: |
4646
const fs = require("fs")
4747
return fs.readdirSync("build/libs/").filter(e => !e.endsWith("dev.jar") && !e.endsWith("sources.jar") && e.endsWith(".jar"))[0].replace(".jar", "");
4848
49-
- uses: actions/upload-artifact@v2
49+
- uses: actions/upload-artifact@v3
5050
with:
5151
name: ${{ steps.fname.outputs.result }}
5252
path: build/libs/

.github/workflows/buildrelease.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
# Steps represent a sequence of tasks that will be executed as part of the job
1818
steps:
1919
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
2121
- name: Set up JDK 17
22-
uses: actions/setup-java@v2
22+
uses: actions/setup-java@v3
2323
with:
24-
distribution: 'adopt'
24+
distribution: 'microsoft'
2525
java-version: '17'
2626

2727
- name: Grant execute permission for gradlew
@@ -30,7 +30,7 @@ jobs:
3030
- name: Build with Gradle
3131
run: ./gradlew build
3232

33-
- uses: actions/upload-artifact@v2
33+
- uses: actions/upload-artifact@v3
3434
with:
3535
name: Artifacts
3636
path: build/libs/
@@ -41,6 +41,13 @@ jobs:
4141
run: |
4242
CHANGELOG=$(sed '/___/Q' CHANGELOG.md)
4343
CHANGELOG=$(echo "$CHANGELOG" | sed 1d)
44+
45+
CHANGELOGtmp="${CHANGELOG//'%'/'%25'}"
46+
CHANGELOGtmp="${CHANGELOGtmp//$'\n'/'%0A'}"
47+
CHANGELOGtmp="${CHANGELOGtmp//$'\r'/'%0D'}"
48+
49+
echo "::set-output name=changelog::$CHANGELOGtmp"
50+
4451
echo "Changelog:\n$CHANGELOG"
4552
4653
changelog="${CHANGELOG}"
@@ -81,14 +88,13 @@ jobs:
8188
CHANGELOG=$(echo -n "$modified_changelog")
8289
fi
8390
84-
CHANGELOG-discord="${CHANGELOG//'%'/'%25'}"
85-
CHANGELOG-discord="${CHANGELOG//$'\n'/'%0A'}"
86-
CHANGELOG-discord="${CHANGELOG//$'\r'/'%0D'}"
91+
CHANGELOG="${CHANGELOG//'%'/'%25'}"
92+
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}"
93+
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}"
8794
88-
echo "::set-output name=changelog::$changelog"
89-
echo "::set-output name=changelog-discord::$CHANGELOG-discord"
95+
echo "::set-output name=changelog_discord::$CHANGELOG"
9096
91-
- uses: actions/github-script@v2
97+
- uses: actions/github-script@v6
9298
id: fname
9399
with:
94100
result-encoding: string
@@ -124,12 +130,9 @@ jobs:
124130
with:
125131
args: |
126132
"@Update-Notification"
127-
"Skyblocker ${{ steps.version_tag.outputs.value }}"
133+
"## Skyblocker ${{ steps.version_tag.outputs.value }}"
128134
""
129-
"Changelog"
130-
"```md"
131-
"${{ steps.read_changelog.outputs.changelog-discord }}"
132-
"```"
135+
"${{ steps.read_changelog.outputs.changelog_discord }}"
133136
":inbox_tray: Download latest version on Modrinth or Github:"
134137
"<:modrinth:900697862206287882> <${{ steps.modrinth.outputs.url }}>"
135138
"<:github:900697885706952725> <${{ steps.uploadrelease.outputs.url }}>"

0 commit comments

Comments
 (0)