Skip to content

Commit 7162974

Browse files
authored
Merge pull request #2672 from skaut/release-action-update
Updated release action to not use deprecated features
2 parents 082d5e8 + 50de292 commit 7162974

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -74,32 +74,20 @@ jobs:
7474

7575
- name: Get the version
7676
id: version
77-
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
77+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
7878

7979
- name: "Create zip"
8080
run: |
81-
zip -r dist.zip ${{ github.event.repository.name }}
81+
zip -r ${{ github.event.repository.name }}.${{ steps.version.outputs.VERSION }}.zip ${{ github.event.repository.name }}
8282
8383
- name: "Extract changelog"
8484
run: |
8585
sed -n '/=\s\?${{ steps.version.outputs.VERSION }}\s\?=/{:a;n;/=.*/b;p;ba}' ${{ github.event.repository.name }}/readme.txt > body.md
8686
8787
- name: "Create a release"
88-
id: create_release
89-
uses: actions/[email protected]
90-
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
uses: softprops/action-gh-release@v2
9289
with:
93-
tag_name: ${{ github.ref }}
94-
release_name: Version ${{ github.ref }}
90+
token: ${{ secrets.GITHUB_TOKEN }}
91+
name: Version ${{ github.ref }}
9592
body_path: ./body.md
96-
97-
- name: "Upload release asset"
98-
uses: actions/[email protected]
99-
env:
100-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101-
with:
102-
upload_url: ${{ steps.create_release.outputs.upload_url }}
103-
asset_path: ./dist.zip
104-
asset_name: ${{ github.event.repository.name }}.${{ steps.version.outputs.VERSION }}.zip
105-
asset_content_type: application/zip
93+
files: ${{ github.event.repository.name }}.${{ steps.version.outputs.VERSION }}.zip

0 commit comments

Comments
 (0)