Skip to content

Merge pull request #36 from runwaylab/bump-version #11

Merge pull request #36 from runwaylab/bump-version

Merge pull request #36 from runwaylab/bump-version #11

Workflow file for this run

name: release
on:
push:
branches: [main]
paths: ["src/version.cr"]
workflow_dispatch:
permissions:
contents: write
id-token: write
attestations: write
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: fetch crystal version
id: crystal-version
run: echo "crystal=$(cat .crystal-version)" >> $GITHUB_OUTPUT
- name: install crystal
uses: crystal-lang/[email protected]
with:
crystal: ${{ steps.crystal-version.outputs.crystal }}
- name: bootstrap
run: script/bootstrap --ci
- name: fetch version
run: |
export RELEASE_VERSION=$(grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+' src/version.cr)
echo "VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
- name: test
run: script/test
- name: build (linux x86_64)
run: |
mkdir -p releases
script/build --production
mv ./bin/runway ./releases/runway-linux-x86_64
- name: generate artifact attestation
uses: actions/[email protected]
with:
subject-path: 'releases/runway-*'
- uses: actions/upload-artifact@v4
with:
name: runway-binaries
path: releases/
- uses: actions/[email protected]
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- name: Push a Release
id: release
uses: ncipollo/[email protected]
with:
artifacts: "./releases/*"
tag: ${{ env.VERSION }}
generateReleaseNotes: true
artifactErrorsFailBuild: true
replacesArtifacts: true
token: ${{ steps.app-token.outputs.token }}
- name: release url
env:
RELEASE_URL: ${{ steps.release.outputs.html_url }}
run: |
echo "release url: $RELEASE_URL"