Skip to content

Build and Publish

Build and Publish #2

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Build and Publish
on:
release:
types: [created]
jobs:
linux-build:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
steps:
- uses: actions/checkout@v4
- run: sudo apt-get install jq -y
- run: sudo chmod +x src/configure
- run: tar -czvf --exclude='.git' --exclude='.github' --exclude=octave_zstd.tar.gz octave_zstd.tar.gz .
- run: release_id=$(gh release list --repo $GITHUB_REPOSITORY --limit 1 --json id --jq '.[0].id')
- run: gh release upload $release_id octave_zstd.tar.gz --name "octave_zstd.tar.gz" --repo $GITHUB_REPOSITORY