Skip to content

Commit

Permalink
feat(wip): 14
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwagner committed Jan 27, 2024
1 parent 5f05f51 commit f10c3a5
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ on:
inputs:
branch:
description: Branch
pull_request: # TODO: only for testing
dry_run:
description: Dry Run
type: boolean
default: false
# TODO: only for testing
pull_request:
branches: "*"

jobs:
Expand All @@ -34,15 +39,16 @@ jobs:
sha256sum bin/lucky | awk '{print $1}' > ./bin/checksums.txt
tar -czvf lucky-linux-amd64.tar.gz -C ./bin .
- uses: actions/upload-artifact@v4
if: ${{ !github.event.inputs.dry_run }}
with:
name: lucky-linux-amd64
name: linux
path: lucky-linux-amd64.tar.gz
if-no-files-found: error

build-windows-amd64:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: crystal-lang/install-crystal@v1
Expand All @@ -53,8 +59,9 @@ jobs:
(Get-FileHash ./bin/lucky.exe).Hash | Out-File ./bin/checksums.txt
Compress-Archive -Path ./bin/* -DestinationPath lucky-windows-amd64.zip
- uses: actions/upload-artifact@v4
if: ${{ !github.event.inputs.dry_run }}
with:
name: lucky-windows-amd64
name: windows
path: lucky-windows-amd64.zip
if-no-files-found: error

Expand All @@ -65,13 +72,17 @@ jobs:
- build-windows-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/download-artifact@v4
with:
path: artifacts
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
fail_on_unmatched_files: true
files: |
lucky-linux-amd64/lucky-linux-amd64.tar.gz
lucky-windows-amd64/lucky-windows-amd64.zip
artifacts/linux/lucky-linux-amd64.tar.gz
artifacts/windows/lucky-windows-amd64.zip

0 comments on commit f10c3a5

Please sign in to comment.