Skip to content

Commit c7713b7

Browse files
committed
Redesign GitHub workflows
1 parent 997d629 commit c7713b7

File tree

5 files changed

+57
-91
lines changed

5 files changed

+57
-91
lines changed

.github/label-commenter-config.yml

-33
This file was deleted.

.github/workflows/ci.yml

+22-10
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
build:
2323
name: "CI - Build Job"
2424
runs-on: "${{ matrix.os }}"
25+
permissions:
26+
contents: read
2527

2628
strategy:
2729
matrix:
@@ -48,13 +50,14 @@ jobs:
4850
- name: "Create Completion Lists"
4951
run: "python -u tools/createCompletionLists.py"
5052

51-
- name: "Build LTeX LS"
53+
- name: "Build LTeX+ LS"
5254
run: "mvn -B -e verify"
5355

5456
validate:
5557
name: "CI - Validate Job"
5658
runs-on: "ubuntu-latest"
57-
59+
permissions:
60+
contents: read
5861
steps:
5962
- name: "Checkout Repository"
6063
uses: "actions/checkout@v4"
@@ -86,7 +89,8 @@ jobs:
8689
- "validate"
8790
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
8891
runs-on: "ubuntu-latest"
89-
92+
permissions:
93+
contents: write
9094
steps:
9195
- name: "Checkout Repository"
9296
uses: "actions/checkout@v4"
@@ -123,16 +127,24 @@ jobs:
123127
- name: "Create Completion Lists"
124128
run: "python -u tools/createCompletionLists.py"
125129

126-
- name: "Build LTeX LS"
130+
- name: "Build LTeX+ LS"
127131
run: "mvn -B -e package"
128132

129133
- name: "Create Binary Archives"
130134
run: "python -u tools/createBinaryArchives.py"
131135

132136
- name: "Create GitHub Release"
133-
uses: "softprops/action-gh-release@v2"
134-
with:
135-
token: "${{ secrets.GITHUB_TOKEN }}"
136-
prerelease: "${{ env.LTEX_LS_IS_PRERELEASE }}"
137-
body: "${{ env.LTEX_LS_CHANGELOG }}"
138-
files: "target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}*.@(tar.gz|zip)"
137+
run: >
138+
gh release create ${{ github.ref_name }}
139+
--prerelease=${{ env.LTEX_LS_IS_PRERELEASE }}
140+
--title='${{ env.LTEX_LS_VERSION }}'
141+
--notes='${{ env.LTEX_LS_CHANGELOG }}'
142+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}.tar.gz'
143+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-linux-x64.tar.gz'
144+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-mac-x64.tar.gz'
145+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-windows-x64.zip'
146+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-linux-aarch64.tar.gz'
147+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-mac-aarch64.tar.gz'
148+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-windows-aarch64.zip'
149+
env:
150+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/issue-pr-assignment.yml

+15-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,21 @@ jobs:
1717
auto-assign:
1818
runs-on: ubuntu-latest
1919
permissions:
20+
contents: read
2021
issues: write
2122
pull-requests: write
2223
steps:
23-
- name: Auto-assign issue and pull request
24-
uses: pozil/auto-assign-issue@v2
25-
with:
26-
assignees: spitzerd
24+
- name: "Checkout Repository"
25+
uses: "actions/checkout@v4"
26+
27+
- name: Auto-assign issue
28+
if: "${{ github.event_name == 'issues' }}"
29+
run: gh issue edit ${{ github.event.issue.number }} --add-assignee spitzerd
30+
env:
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Auto-assign pull request
34+
if: "${{ github.event_name == 'pull_request' }}"
35+
run: gh pr edit ${{ github.event.pull_request.number }} --add-assignee spitzerd
36+
env:
37+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label-commenter.yml

-33
This file was deleted.

.github/workflows/nightly.yml

+20-11
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ on:
1313

1414
jobs:
1515
check_latest_commit:
16-
runs-on: "ubuntu-latest"
1716
name: "Check latest commit"
17+
runs-on: "ubuntu-latest"
18+
permissions:
19+
contents: read
1820
outputs:
1921
NEW_COMMIT: ${{ steps.check_latest_commit.outputs.NEW_COMMIT }}
2022
steps:
@@ -30,7 +32,8 @@ jobs:
3032
needs: check_latest_commit
3133
if: ${{ needs.check_latest_commit.outputs.NEW_COMMIT == 'true' || github.event_name == 'workflow_dispatch' }}
3234
runs-on: "ubuntu-latest"
33-
35+
permissions:
36+
contents: write
3437
steps:
3538
- name: "Checkout Repository"
3639
uses: "actions/checkout@v4"
@@ -61,27 +64,33 @@ jobs:
6164
- name: "Create Completion Lists"
6265
run: "python -u tools/createCompletionLists.py"
6366

64-
- name: "Build LTeX LS"
67+
- name: "Build LTeX+ LS"
6568
run: "mvn -B -e package"
6669

6770
- name: "Create Binary Archives"
6871
run: "python -u tools/createBinaryArchives.py"
6972

7073
- name: "Delete Old Nightly Releases"
7174
run: "gh release delete nightly -y"
75+
continue-on-error: true
7276
env:
7377
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7478

7579
- name: "Update Nightly Tag"
7680
run: "git tag -f nightly && git push -f origin nightly"
7781

7882
- name: "Create GitHub Release"
79-
uses: "softprops/action-gh-release@v2"
83+
run: >
84+
gh release create nightly
85+
--prerelease=true
86+
--title='${{ env.LTEX_LS_VERSION }}'
87+
--notes='This is a nightly build. Use at your own risk.'
88+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}.tar.gz'
89+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-linux-x64.tar.gz'
90+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-mac-x64.tar.gz'
91+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-windows-x64.zip'
92+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-linux-aarch64.tar.gz'
93+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-mac-aarch64.tar.gz'
94+
'target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}-windows-aarch64.zip'
8095
env:
81-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
82-
with:
83-
tag_name: "nightly"
84-
name: "${{ env.LTEX_LS_VERSION }}"
85-
prerelease: true
86-
body: "This is a nightly build. Use at your own risk."
87-
files: "target/ltex-ls-plus-${{ env.LTEX_LS_VERSION }}*.@(tar.gz|zip)"
96+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)