Skip to content

Commit

Permalink
permissions and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantBirki committed May 9, 2024
1 parent 67763e5 commit 3636a33
Showing 1 changed file with 53 additions and 50 deletions.
103 changes: 53 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,59 @@
name: release
on:
push:
branches: [ main ]
paths: [ "src/version.cr" ]
branches: [main]
paths: ["src/version.cr"]
workflow_dispatch:

permissions:
contents: 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)"
- 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"
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"

0 comments on commit 3636a33

Please sign in to comment.