fix(ci): incorrect sytax for bash step #5
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
name: Draft release | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
inputs: | |
bump: | |
type: choice | |
description: Amount to bump | |
options: | |
- patch | |
- minor | |
- major | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
submodules: recursive | |
- uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a | |
- uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0 | |
- run: nix build '.?submodules=1#squirrel' | |
- uses: actions/upload-artifact@184d73b71b93c222403b2e7f1ffebe4508014249 | |
with: | |
name: libsquirrel.a | |
path: result/libsquirrel.a | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
submodules: recursive | |
- uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a | |
- uses: DeterminateSystems/magic-nix-cache-action@a76a83091cd8728db8c37312dbdd0eeb1177a6c0 | |
- run: nix flake check | |
release: | |
concurrency: | |
group: release | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
needs: [build, test] | |
env: | |
VERSION: ${{github.event.after}} | |
steps: | |
- name: Set bump amount | |
id: bump | |
run: | | |
BUMP_INPUT=${{ github.event.inputs.bump }} | |
echo "bump=${BUMP_INPUT:-"patch"}" >> "$GITHUB_OUTPUT" | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
with: | |
fetch-depth: '0' | |
- uses: actions/download-artifact@d0ce8fd1167ed839810201de977912a090ab10a7 | |
with: | |
name: libsquirrel.a | |
- uses: anothrNick/[email protected] | |
id: tag | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEFAULT_BUMP: ${{ steps.bump.outputs.bump }} | |
WITH_V: true | |
- run: gh release create ${{steps.tag.outputs.new_tag}} --generate-notes libsquirrel.a | |
if: steps.bump.outputs.bump == 'major' || steps.bump.outputs.bump == 'minor' | |
env: | |
GH_TOKEN: ${{ github.token }} |