Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 6c9518f

Browse files
committed
Release workflow
1 parent bca3ab5 commit 6c9518f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.github/workflows/build.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build
33
on:
44
push:
55
branches: [ main ]
6+
tags:
7+
- 'v*'
68
pull_request:
79
branches: [ main ]
810

@@ -190,3 +192,27 @@ jobs:
190192
with:
191193
name: ${{ matrix.arch }}-macos
192194
path: mas-cli-${{ matrix.arch }}-macos.tar.gz
195+
196+
release:
197+
name: Release
198+
if: startsWith(github.ref, 'refs/tags/')
199+
runs-on: ubuntu-latest
200+
steps:
201+
- name: Download the artifacts from the previous job
202+
uses: actions/download-artifact@v3
203+
with:
204+
path: artifacts
205+
206+
- name: Move the release assets
207+
run: |
208+
mv ./artifacts/{x86_64,aarch64}-{linux,macos}/* ./
209+
210+
- name: Prepare a release
211+
uses: softprops/action-gh-release@v1
212+
with:
213+
files: |
214+
mas-cli-aarch64-linux.tar.gz
215+
mas-cli-aarch64-macos.tar.gz
216+
mas-cli-x86_64-linux.tar.gz
217+
mas-cli-x86_64-macos.tar.gz
218+
draft: true

.github/workflows/ci.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: CI
33
on:
44
push:
55
branches: [ main ]
6+
tags:
7+
- 'v*'
68
pull_request:
79
branches: [ main ]
810

0 commit comments

Comments
 (0)