|
1 | 1 | name: Release |
2 | 2 |
|
3 | | -on: [workflow_dispatch] |
| 3 | +on: |
| 4 | + release: |
| 5 | + types: |
| 6 | + - released |
| 7 | + workflow_dispatch: |
4 | 8 |
|
5 | 9 | jobs: |
6 | 10 | build_and_test: |
@@ -47,30 +51,19 @@ jobs: |
47 | 51 | path: | |
48 | 52 | .dist/win-x64 |
49 | 53 |
|
50 | | - - name: Check release exists |
51 | | - |
52 | | - id: check-tag |
53 | | - with: |
54 | | - tag: 'V${{ steps.get-version.outputs.version }}' |
55 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
56 | | - |
57 | | - - name: Create or update GitHub Release |
58 | | - id: create_or_update_github_release |
59 | | - uses: actions/create-release@v1 |
| 54 | + - name: Upload Artifact |
| 55 | + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 |
60 | 56 | with: |
61 | | - tag_name: "V${{ steps.get-version.outputs.version }}" |
62 | | - release_name: "Pre-release ${{ steps.get-version.outputs.version }}" |
63 | | - draft: false |
64 | | - prerelease: true |
65 | | - env: |
66 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
67 | | - if: steps.check-tag.outputs.exists != 'true' |
| 57 | + name: build-artifact |
| 58 | + retention-days: 30 |
| 59 | + if-no-files-found: error |
| 60 | + path: .dist/zipped/*.zip |
68 | 61 |
|
69 | | - |
70 | | - - name: Update nightly release |
71 | | - uses: pyTooling/Actions/releaser@main |
| 62 | + - name: Upload to Release |
| 63 | + id: release |
| 64 | + if: ${{ github.event_name == 'release' }} |
| 65 | + uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1.7.2 |
72 | 66 | with: |
73 | | - tag: ${{ steps.get-version.outputs.version }} |
74 | | - token: ${{ secrets.GITHUB_TOKEN }} |
75 | | - files: .dist/zipped/*.zip |
76 | | - if: steps.check-tag.outputs.exists != 'true' |
| 67 | + upload_url: ${{ github.event.release.upload_url }} |
| 68 | + overwrite: true |
| 69 | + asset_path: .dist/zipped/*.zip |
0 commit comments