Created
April 15, 2024 08:44
-
-
Save damienfern/fc10a2a1d52b2653b134c2bf6c2772a5 to your computer and use it in GitHub Desktop.
Uploading artifacts on new release with Github Actions
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
# Trigger this workflow on release | |
on: | |
release: | |
types: [published] | |
# Make sure the GITHUB_TOKEN has permission to upload to our releases | |
permissions: | |
contents: write | |
jobs: | |
linux: | |
name: "Build Linux standalone version" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
# Setup and build | |
- name: Archive Linux Build | |
run: | | |
zip myproject-${{ github.event.release.tag_name }}_linux_standalone_x86-64.zip -r dist | |
- name: "Upload to Github Release" | |
run: | | |
gh release upload ${{ github.event.release.tag_name }} myproject-${{ github.event.release.tag_name }}_linux_standalone_x86-64.zip | |
env: | |
GITHUB_TOKEN: ${{ github.TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment