Skip to content

Commit 7e5e216

Browse files
committed
Update workflows
1 parent f758fef commit 7e5e216

3 files changed

Lines changed: 45 additions & 21 deletions

File tree

.github/workflows/aur.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@ jobs:
1111
if: github.event.workflow_run.conclusion == 'success'
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v6
1515
with:
1616
ref: ${{ github.event.workflow_run.head_branch }}
1717

1818
- name: Extract version
1919
id: version
20-
env:
21-
TAG: ${{ github.event.workflow_run.head_branch }}
2220
run: |
21+
TAG="${{ github.event.workflow_run.head_branch }}"
2322
echo "pkgver=${TAG#v}" >> "$GITHUB_OUTPUT"
2423
2524
- name: Generate PKGBUILD
@@ -90,11 +89,36 @@ jobs:
9089
cat PKGBUILD
9190
9291
- name: Publish to AUR
93-
uses: KSXGitHub/github-actions-deploy-aur@v4.1.1
94-
with:
95-
pkgname: aether
96-
pkgbuild: ./PKGBUILD
97-
commit_username: ${{ secrets.AUR_USERNAME }}
98-
commit_email: ${{ secrets.AUR_EMAIL }}
99-
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
100-
commit_message: "Update to v${{ steps.version.outputs.pkgver }}"
92+
env:
93+
AUR_SSH_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
94+
AUR_USERNAME: ${{ secrets.AUR_USERNAME }}
95+
AUR_EMAIL: ${{ secrets.AUR_EMAIL }}
96+
PKGVER: ${{ steps.version.outputs.pkgver }}
97+
run: |
98+
mkdir -p ~/.ssh
99+
echo "$AUR_SSH_KEY" > ~/.ssh/aur
100+
chmod 600 ~/.ssh/aur
101+
ssh-keyscan -t rsa,ecdsa,ed25519 aur.archlinux.org >> ~/.ssh/known_hosts 2>/dev/null
102+
cat >> ~/.ssh/config <<EOF
103+
Host aur.archlinux.org
104+
IdentityFile ~/.ssh/aur
105+
User aur
106+
EOF
107+
108+
git clone ssh://aur@aur.archlinux.org/aether.git aur-repo
109+
cd aur-repo
110+
111+
git config user.name "$AUR_USERNAME"
112+
git config user.email "$AUR_EMAIL"
113+
114+
cp ../PKGBUILD .
115+
docker run --rm -v "$PWD/PKGBUILD:/PKGBUILD:ro" archlinux:base bash -c \
116+
'pacman -Sy --noconfirm pacman-contrib >&2 && cp /PKGBUILD /tmp/ && cd /tmp && chown nobody PKGBUILD && runuser -u nobody -- makepkg --printsrcinfo' > .SRCINFO
117+
118+
git add PKGBUILD .SRCINFO
119+
if git diff --cached --quiet; then
120+
echo "No changes to commit"
121+
else
122+
git commit -m "Update to v${PKGVER}"
123+
git push
124+
fi

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ jobs:
2828

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@v6
3232

3333
- name: Set up Go
3434
if: matrix.language == 'go'
35-
uses: actions/setup-go@v5
35+
uses: actions/setup-go@v6
3636
with:
3737
go-version: '1.23'
3838

3939
- name: Set up Node.js
4040
if: matrix.language == 'go'
41-
uses: actions/setup-node@v4
41+
uses: actions/setup-node@v5
4242
with:
4343
node-version: '20'
4444

.github/workflows/release.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
runs-on: ${{ matrix.os }}
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Set up Go
26-
uses: actions/setup-go@v5
26+
uses: actions/setup-go@v6
2727
with:
2828
go-version: '1.23'
2929

3030
- name: Set up Node.js
31-
uses: actions/setup-node@v4
31+
uses: actions/setup-node@v5
3232
with:
3333
node-version: '22'
3434

@@ -99,7 +99,7 @@ jobs:
9999
mv "${PKG_DIR}.deb" "build/bin/"
100100
101101
- name: Upload artifact
102-
uses: actions/upload-artifact@v4
102+
uses: actions/upload-artifact@v7
103103
with:
104104
name: aether-linux-${{ matrix.arch }}
105105
path: |
@@ -112,12 +112,12 @@ jobs:
112112
runs-on: ubuntu-latest
113113
steps:
114114
- name: Checkout code
115-
uses: actions/checkout@v4
115+
uses: actions/checkout@v6
116116
with:
117117
fetch-depth: 0
118118

119119
- name: Download all artifacts
120-
uses: actions/download-artifact@v4
120+
uses: actions/download-artifact@v8
121121
with:
122122
path: artifacts
123123

@@ -172,7 +172,7 @@ jobs:
172172
echo "pkgver=${TAG_NAME#v}" >> "$GITHUB_OUTPUT"
173173
174174
- name: Create Release
175-
uses: softprops/action-gh-release@v1
175+
uses: softprops/action-gh-release@v2
176176
with:
177177
generate_release_notes: false
178178
files: |

0 commit comments

Comments
 (0)