Skip to content

Commit bb887cf

Browse files
committed
ci: replace deprecated release actions with modern equivalents
- actions/create-release@v1 -> softprops/action-gh-release@v2 - actions/upload-release-asset@v1 -> gh release upload - actions/upload-artifact@v4 -> @v7 - actions/download-artifact@v4 -> @v8
1 parent 867335f commit bb887cf

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
cargo deb -p teracli -o "tera-cli_linux_amd64.deb"
2828
2929
- name: Upload Linux artifacts
30-
uses: actions/upload-artifact@v4
30+
uses: actions/upload-artifact@v7
3131
with:
3232
name: linux
3333
path: "tera-cli_linux_amd64.deb"
@@ -37,8 +37,7 @@ jobs:
3737
name: Create Draft
3838
runs-on: ubuntu-latest
3939
outputs:
40-
release_url: ${{ steps.create-release.outputs.html_url }}
41-
asset_upload_url: ${{ steps.create-release.outputs.upload_url }}
40+
release_url: ${{ steps.create-release.outputs.url }}
4241
steps:
4342
- uses: actions/checkout@v6
4443
with:
@@ -47,7 +46,7 @@ jobs:
4746
run: |
4847
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
4948
echo "SHORT_SHA=${GITHUB_SHA::8}" >> $GITHUB_ENV
50-
- uses: actions/download-artifact@v4
49+
- uses: actions/download-artifact@v8
5150

5251
# TODO: here we could fetch the artifacts and reuse our freshest build.
5352
- name: Install tera v0.1.0
@@ -91,14 +90,14 @@ jobs:
9190

9291
- name: Create Release
9392
id: create-release
94-
uses: actions/create-release@v1
95-
env:
96-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
uses: softprops/action-gh-release@v2
9794
with:
9895
tag_name: ${{ env.RELEASE_VERSION }}
99-
release_name: Tera ${{ env.RELEASE_VERSION }} (${{ env.SHORT_SHA }})
96+
name: Tera ${{ env.RELEASE_VERSION }} (${{ env.SHORT_SHA }})
10097
body_path: ./RELEASE_NOTES.md
10198
draft: true
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102101

103102
publish-debian-package:
104103
runs-on: ubuntu-latest
@@ -110,17 +109,12 @@ jobs:
110109
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
111110
echo "SHORT_SHA=${GITHUB_SHA::8}" >> $GITHUB_ENV
112111
113-
- uses: actions/download-artifact@v4
112+
- uses: actions/download-artifact@v8
114113

115114
- name: Upload Debian package
116-
uses: actions/upload-release-asset@v1
115+
run: gh release upload ${{ env.RELEASE_VERSION }} linux/tera-cli_linux_amd64.deb
117116
env:
118-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119-
with:
120-
upload_url: ${{ needs.create_draft.outputs.asset_upload_url }}
121-
asset_path: "linux/tera-cli_linux_amd64.deb"
122-
asset_name: "tera-cli_linux_amd64.deb"
123-
asset_content_type: application/vnd.debian.binary-package
117+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124118

125119
publish-linux-and-windowns-binaries:
126120
needs: ["create_draft"]

0 commit comments

Comments
 (0)