forked from slackhq/nebula
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix up the release workflow (slackhq#891)
actions/create-release is deprecated, just switch to using `gh` cli. This is actually much easier anyways!
- Loading branch information
Showing
1 changed file
with
17 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
mv build/*.tar.gz release | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: linux-latest | ||
path: release | ||
|
@@ -55,7 +55,7 @@ jobs: | |
mv dist\windows\wintun build\dist\windows\ | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-latest | ||
path: build | ||
|
@@ -104,7 +104,7 @@ jobs: | |
fi | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: darwin-latest | ||
path: ./release/* | ||
|
@@ -114,19 +114,24 @@ jobs: | |
needs: [build-linux, build-darwin, build-windows] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Download artifacts | ||
uses: actions/download-artifact@v2 | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts | ||
|
||
- name: Zip Windows | ||
run: | | ||
cd windows-latest | ||
cd artifacts/windows-latest | ||
cp windows-amd64/* . | ||
zip -r nebula-windows-amd64.zip nebula.exe nebula-cert.exe dist | ||
cp windows-arm64/* . | ||
zip -r nebula-windows-arm64.zip nebula.exe nebula-cert.exe dist | ||
- name: Create sha256sum | ||
run: | | ||
cd artifacts | ||
for dir in linux-latest darwin-latest windows-latest | ||
do | ||
( | ||
|
@@ -156,195 +161,12 @@ jobs: | |
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
|
||
## | ||
## Upload assets (I wish we could just upload the whole folder at once... | ||
## | ||
|
||
- name: Upload SHASUM256.txt | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./SHASUM256.txt | ||
asset_name: SHASUM256.txt | ||
asset_content_type: text/plain | ||
|
||
- name: Upload darwin zip | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./darwin-latest/nebula-darwin.zip | ||
asset_name: nebula-darwin.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload windows-amd64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./windows-latest/nebula-windows-amd64.zip | ||
asset_name: nebula-windows-amd64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload windows-arm64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./windows-latest/nebula-windows-arm64.zip | ||
asset_name: nebula-windows-arm64.zip | ||
asset_content_type: application/zip | ||
|
||
- name: Upload linux-amd64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-amd64.tar.gz | ||
asset_name: nebula-linux-amd64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-386 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-386.tar.gz | ||
asset_name: nebula-linux-386.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-ppc64le | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-ppc64le.tar.gz | ||
asset_name: nebula-linux-ppc64le.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-arm-5 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-arm-5.tar.gz | ||
asset_name: nebula-linux-arm-5.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-arm-6 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-arm-6.tar.gz | ||
asset_name: nebula-linux-arm-6.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-arm-7 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-arm-7.tar.gz | ||
asset_name: nebula-linux-arm-7.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-arm64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-arm64.tar.gz | ||
asset_name: nebula-linux-arm64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-mips | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-mips.tar.gz | ||
asset_name: nebula-linux-mips.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-mipsle | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-mipsle.tar.gz | ||
asset_name: nebula-linux-mipsle.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-mips64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-mips64.tar.gz | ||
asset_name: nebula-linux-mips64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-mips64le | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-mips64le.tar.gz | ||
asset_name: nebula-linux-mips64le.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-mips-softfloat | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-mips-softfloat.tar.gz | ||
asset_name: nebula-linux-mips-softfloat.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload linux-riscv64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-linux-riscv64.tar.gz | ||
asset_name: nebula-linux-riscv64.tar.gz | ||
asset_content_type: application/gzip | ||
|
||
- name: Upload freebsd-amd64 | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./linux-latest/nebula-freebsd-amd64.tar.gz | ||
asset_name: nebula-freebsd-amd64.tar.gz | ||
asset_content_type: application/gzip | ||
run: | | ||
cd artifacts | ||
gh release create \ | ||
--verify-tag \ | ||
--title "Release ${{ github.ref_name }}" \ | ||
"${{ github.ref_name }}" \ | ||
SHASUM256.txt *-latest/*.zip *-latest/*.tar.gz |