Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload artifacts directly to release #187

Merged
merged 3 commits into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 12 additions & 46 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
name: Release

on:
workflow_dispatch:
inputs:
tag:
description: "Tag to release"
required: true
commit:
description: "Commit to release (set to 'main' to release the latest commit on main)"
required: true
release:
types:
- created

permissions:
contents: write
issues: write

jobs:
release-linux-artifact:
Expand All @@ -37,12 +31,11 @@ jobs:
mv ./bin/linux-x86_64/resonate ./bin/resonate_linux_x86_64
mv ./bin/linux-aarch64/resonate ./bin/resonate_linux_aarch64
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: linux-releases
path: |
./bin/resonate_linux_x86_64
./bin/resonate_linux_aarch64
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ github.event.release.tag_name }} ./bin/resonate_linux_x86_64 --clobber
gh release upload ${{ github.event.release.tag_name }} ./bin/resonate_linux_aarch64 --clobber

release-darwin-artifact:
runs-on: macos-latest
Expand All @@ -62,35 +55,8 @@ jobs:
mv ./bin/darwin-x86_64/resonate ./bin/resonate_darwin_x86_64
mv ./bin/darwin-aarch64/resonate ./bin/resonate_darwin_aarch64
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: darwin-releases
path: |
./bin/resonate_darwin_x86_64
./bin/resonate_darwin_aarch64

release-create:
needs: [release-linux-artifact, release-darwin-artifact]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download All Artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
pattern: "*-releases"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
uses: ncipollo/release-action@v1
with:
tag: ${{ github.event.inputs.tag }}
commit: ${{ github.event.inputs.commit }}
generateReleaseNotes: true
skipIfReleaseExists: true
artifacts: |
/home/runner/work/resonate/resonate/artifacts/linux-releases/resonate_linux_x86_64
/home/runner/work/resonate/resonate/artifacts/linux-releases/resonate_linux_aarch64
/home/runner/work/resonate/resonate/artifacts/darwin-releases/resonate_darwin_x86_64
/home/runner/work/resonate/resonate/artifacts/darwin-releases/resonate_darwin_aarch64
GH_TOKEN: ${{ github.token }}
run: |
gh release upload ${{ github.event.release.tag_name }} ./bin/resonate_darwin_x86_64 --clobber
gh release upload ${{ github.event.release.tag_name }} ./bin/resonate_darwin_aarch64 --clobber