Skip to content

Commit

Permalink
ci/cd: upload artifacts between workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
realkarmakun committed Jul 17, 2024
1 parent 7757461 commit 1f7b6fc
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Release

on:
push:
tags:
- "v*.*.*"
workflow_run:
workflows: ["build"]
branches: [master]
types:
- completed

jobs:
build:
Expand All @@ -12,10 +14,22 @@ jobs:
- name: Download artifacts for release
uses: dawidd6/action-download-artifact@v6
with:
path: dist
workflow: build.yml
- name: Release
- name: Rename artifacts
run: |
mv dist/pterocli-macos-amd64/pterocli pterocli-macos-amd64
mv dist/pterocli-linux-amd64/pterocli pterocli-linux-amd64
mv dist/pterocli-win-amd64.exe/pterocli.exe pterocli-win-amd64.exe
- name: Create release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
prerelease: true
draft: true
prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'beta') || contains(github.ref, 'alpha') }}
#body_path: ./RELEASE_CHANGELOG
files: |
pterocli*/*
pterocli-macos-amd64
pterocli-linux-amd64
pterocli-win-amd64.exe

0 comments on commit 1f7b6fc

Please sign in to comment.