-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (73 loc) · 2.13 KB
/
build.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build
on:
push:
branches: [ "main", "build-test" ]
workflow_dispatch:
inputs:
release:
description: 'Skip pre release build'
required: false
type: boolean
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up yarn
uses: DerYeger/yarn-setup-action@master
with:
node-version: 16.14.0
- name: Clean pre releases
uses: dev-drprasad/[email protected]
if: ${{ !inputs.release }}
with:
keep_latest: 0
delete_tags: true
delete_prerelease_only: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get current version
id: current_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_release_rules: feat:patch,bump:minor
dry_run: true
- name: Build yarn
run: |
yarn version --new-version ${{ steps.current_version.outputs.new_version }} --no-git-tag-version
yarn build
yarn lint
yarn test:ci
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build go
run: |
go run mage.go
- name: Zip artifacts
run: |
yarn zip
- name: Attatch artifacts to job
uses: actions/upload-artifact@v3
with:
name: sasesp-plugin-zip-files
path: ./sasesp-plugin*.zip
retention-days: 14
- name: Bump version and push tag
if: ${{ !inputs.release }}
id: release_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_release_rules: feat:patch,bump:minor
- name: Create a GitHub release
if: ${{ !inputs.release }}
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.release_version.outputs.new_tag }}
name: Release ${{ steps.release_version.outputs.new_tag }}
body: ${{ steps.release_version.outputs.changelog }}
artifacts: "./sasesp-plugin*.zip"
preRelease: true