Skip to content

Commit

Permalink
Merge pull request #21 from runwaylab/release
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
GrantBirki committed May 9, 2024
2 parents 340a22f + 6637e66 commit 67763e5
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: release
on:
push:
branches: [ main ]
paths: [ "src/version.cr" ]
workflow_dispatch:

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)"

- name: install crystal
uses: crystal-lang/install-crystal@v1.8.2
with:
crystal: ${{ steps.crystal-version.outputs.crystal }}

- name: bootstrap
run: script/bootstrap

- 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
mv ./bin/runway ./releases/runway-linux-x86_64
- name: Push a Release
id: release
uses: ncipollo/release-action@v1.14.0
with:
artifacts: "./releases/*"
tag: ${{ env.VERSION }}
generateReleaseNotes: true
artifactErrorsFailBuild: true
replacesArtifacts: true

- name: release url
env:
RELEASE_URL: ${{ steps.release.outputs.html_url }}
run: |
echo "release url: $RELEASE_URL"
2 changes: 1 addition & 1 deletion src/version.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Runway
VERSION = "v0.1.0"
VERSION = "v0.0.1"
end

0 comments on commit 67763e5

Please sign in to comment.