Skip to content

Commit c2217f1

Browse files
committed
Update GH workflow.
1 parent 3dc223a commit c2217f1

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ name: Build Release
1111
jobs:
1212
deb-package:
1313
name: build DEB-Package
14-
runs-on: ubuntu-18.04
14+
runs-on: ubuntu-24.04
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v3
1818

1919
- name: Install dependencies
2020
run: sudo apt update && sudo apt install debhelper build-essential -y
@@ -26,7 +26,7 @@ jobs:
2626
run: mkdir package && cp ../linuxmuster-linuxclient7_* ./package
2727

2828
- name: Upload artifact
29-
uses: actions/upload-artifact@v2
29+
uses: actions/upload-artifact@v4
3030
with:
3131
name: deb-package
3232
path: package/*
@@ -35,42 +35,34 @@ jobs:
3535
needs: deb-package
3636
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
3737
name: GitHub Release
38-
runs-on: ubuntu-18.04
38+
runs-on: ubuntu-24.04
3939
steps:
4040
- name: Download artifact
41-
uses: actions/download-artifact@v2
41+
uses: actions/download-artifact@v4.1.7
4242
with:
4343
name: deb-package
4444

4545
- name: Extract current changes
4646
run: cat *.changes | sed '0,/^Changes:$/d' | sed '/Checksums.*/Q' | sed '1,2d' | tail >> ./current-changes
4747

48-
- name: Define distribution variable
48+
- name: Define distribution variables
4949
run: |
5050
export DISTRIBUTION=$(grep -i ^Distribution *.changes | awk -F\: '{ print $2 }' | awk '{ print $1 }')
5151
echo "DISTRIBUTION=$DISTRIBUTION" >> $GITHUB_ENV
5252
5353
export VERSION=$(grep -i ^Version *.changes | awk -F\: '{ print $2 }' | awk '{ print $1 }')
5454
echo "VERSION=$VERSION" >> $GITHUB_ENV
5555
56-
- name: Test if it's a testing prerelease
57-
id: check_prerelease
58-
uses: haya14busa/action-cond@v1
59-
with:
60-
cond: ${{ env.DISTRIBUTION == 'lmn71' }}
61-
if_true: "false"
62-
if_false: "true"
63-
6456
- name: Create Release
6557
id: create_release
66-
uses: actions/create-release@v1
58+
uses: softprops/action-gh-release@v1
6759
env:
6860
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6961
with:
7062
tag_name: ${{ github.ref }}
7163
release_name: Release ${{ env.VERSION }} (${{ env.DISTRIBUTION }})
7264
draft: false
73-
prerelease: ${{ steps.check_prerelease.outputs.value }}
65+
prerelease: false
7466
body_path: ./current-changes
7567

7668
- name: Delete current changes file
@@ -85,7 +77,7 @@ jobs:
8577
release_id: ${{ steps.create_release.outputs.id }}
8678
assets_path: .
8779

88-
publsh:
80+
publish:
8981
needs: deb-package
9082
name: Push latest release to archive repo
9183
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.repository == 'linuxmuster/linuxmuster-linuxclient7'
@@ -99,7 +91,7 @@ jobs:
9991
ssh-add - <<< "${{ secrets.REPO_SSH_KEY }}"
10092
10193
- name: Clone archive repo
102-
uses: actions/checkout@v2
94+
uses: actions/checkout@v3
10395
with:
10496
repository: "linuxmuster/deb"
10597
ssh-key: ${{ secrets.REPO_SSH_KEY }}
@@ -109,7 +101,7 @@ jobs:
109101
run: mkdir "package"
110102

111103
- name: Download artifact
112-
uses: actions/download-artifact@v2
104+
uses: actions/download-artifact@v4.1.7
113105
with:
114106
name: deb-package
115107
path: "./package"

0 commit comments

Comments
 (0)