Skip to content

Commit

Permalink
merge: Deploy realeases through github action
Browse files Browse the repository at this point in the history
  • Loading branch information
MizuriGit authored Dec 13, 2023
2 parents df4324e + 215e59e commit 62e24b5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy release

on:
pull_request:
types:
- closed
workflow_run:
workflows: ["CI & CD"]
types:
- completed

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BINARY_NAME: testReleases-exe

jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'v')
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build using stack build
run: |
stack build
- name: Release
run: |
RELEASE_PATH="`stack path --local-install-root`/bin/$BINARY_NAME"
gh release create ${{ github.head_ref }} \
"$RELEASE_PATH" \
-F CHANGELOG.md \
--title "${{ github.head_ref }}"

0 comments on commit 62e24b5

Please sign in to comment.