Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release #21

Merged
merged 3 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/[email protected]
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/[email protected]
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