Skip to content

Commit

Permalink
feat(wip): 13
Browse files Browse the repository at this point in the history
  • Loading branch information
mdwagner committed Jan 27, 2024
1 parent 4c96601 commit 5f05f51
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Lucky CLI Release

#permissions:
#contents: write
permissions:
contents: write

on:
#push:
#tags:
#- "v*.*.*"
#workflow_dispatch:
#inputs:
#branch:
#description: Branch
push:
tags:
- "v*.*.*"
workflow_dispatch:
inputs:
branch:
description: Branch
pull_request: # TODO: only for testing
branches: "*"

Expand All @@ -25,6 +25,8 @@ jobs:
with:
version: v0.8.0
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- name: Build and package
run: |
mkdir -p bin
Expand All @@ -41,6 +43,8 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- uses: crystal-lang/install-crystal@v1
- uses: ilammy/msvc-dev-cmd@v1
- name: Build and package
Expand All @@ -55,12 +59,19 @@ jobs:
if-no-files-found: error

release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs:
- build-linux-amd64
- build-windows-amd64
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: List artifacts
run: |
ls -lAhR
- 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

0 comments on commit 5f05f51

Please sign in to comment.