Skip to content

Commit cdc52b0

Browse files
committed
Update release workflow to use latest GitHub Actions
1 parent 8404e43 commit cdc52b0

File tree

1 file changed

+13
-41
lines changed

1 file changed

+13
-41
lines changed

.github/workflows/release.yml

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -64,56 +64,28 @@ jobs:
6464
if: "!contains(matrix.target, 'windows')"
6565
run: |
6666
zip --junk-paths prefix-aggregator-${{ matrix.target }} target/${{ matrix.target }}/release/prefix-aggregator
67-
- uses: actions/upload-artifact@v3
67+
- uses: actions/upload-artifact@v4
6868
with:
6969
name: build-${{ matrix.target }}
7070
path: prefix-aggregator-${{ matrix.target }}.zip
7171

72-
create-release:
72+
release:
7373
needs: [build]
7474
runs-on: ubuntu-latest
7575
steps:
76-
- id: create-release
77-
uses: actions/[email protected]
78-
env:
79-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
- uses: actions/checkout@v3
77+
78+
- name: Download all artifacts
79+
uses: actions/download-artifact@v4
8080
with:
81-
tag_name: ${{ github.ref }}
82-
release_name: Release ${{ github.ref }}
81+
path: artifacts
82+
83+
- name: Create Release
84+
uses: softprops/action-gh-release@v2
85+
with:
86+
files: |
87+
artifacts/build-*/prefix-aggregator-*.zip
8388
draft: false
8489
prerelease: false
85-
- run: |
86-
echo '${{ steps.create-release.outputs.upload_url }}' > release_upload_url.txt
87-
- uses: actions/upload-artifact@v3
88-
with:
89-
name: create-release
90-
path: release_upload_url.txt
91-
92-
upload-release:
93-
strategy:
94-
matrix:
95-
target:
96-
- x86_64-unknown-linux-gnu
97-
- x86_64-pc-windows-gnu
98-
- x86_64-apple-darwin
99-
- aarch64-apple-darwin
100-
needs: [create-release]
101-
runs-on: ubuntu-latest
102-
steps:
103-
- uses: actions/download-artifact@v3
104-
with:
105-
name: create-release
106-
- id: upload-url
107-
run: |
108-
echo "::set-output name=url::$(cat create-release/release_upload_url.txt)"
109-
- uses: actions/download-artifact@v3
110-
with:
111-
name: build-${{ matrix.target }}
112-
- uses: actions/[email protected]
11390
env:
11491
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115-
with:
116-
upload_url: ${{ steps.upload-url.outputs.url }}
117-
asset_path: ./build-${{ matrix.target }}/prefix-aggregator-${{ matrix.target }}.zip
118-
asset_name: prefix-aggregator-${{ matrix.target }}.zip
119-
asset_content_type: application/zip

0 commit comments

Comments
 (0)