-
Notifications
You must be signed in to change notification settings - Fork 19
37 lines (33 loc) · 1.06 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
make
- name: Get code info
id: info
run: |
source scripts/version
echo "::set-output name=artifacts_dir::${PWD}/dist/artifacts"
echo "::set-output name=version::$(echo $GITHUB_REF | cut -d / -f 3)"
echo "::set-output name=base_version::${VERSION}"
- name: Generate release info
if: startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master')
env:
BASE_VERSION: ${{ steps.info.outputs.base_version }}
run: |
echo "🍻" > release.txt
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
body_path: release.txt
files: ${{ steps.info.outputs.artifacts_dir }}/*