Skip to content

Instantly share code, notes, and snippets.

@damienfern
Created April 15, 2024 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save damienfern/fc10a2a1d52b2653b134c2bf6c2772a5 to your computer and use it in GitHub Desktop.
Save damienfern/fc10a2a1d52b2653b134c2bf6c2772a5 to your computer and use it in GitHub Desktop.
Uploading artifacts on new release with Github Actions
# 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