-
Notifications
You must be signed in to change notification settings - Fork 5
63 lines (57 loc) · 1.77 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
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
name: "release"
on:
workflow_dispatch:
workflow_run:
workflows:
- tests
types:
- completed
branches:
- master
jobs:
state:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up environment
uses: ./.github/actions/setup
- name: Fetch State
id: state
run: bash ./scripts/versions.sh
outputs:
local_version: ${{ steps.state.outputs.local_version }}
version_changed: ${{ steps.state.outputs.version_changed }}
release:
runs-on: ubuntu-latest
needs: state
if: needs.state.outputs.version_changed != 'not_changed'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Create Release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.ARVOLEAR_RELEASER }}
tag_name: ${{ needs.state.outputs.local_version }}
name: Release v${{ needs.state.outputs.local_version }}
body: |
# Release notes v${{ needs.state.outputs.local_version }} 🎉
## This is a ${{ needs.state.outputs.version_changed }} release
To be filled...
draft: false
prerelease: false
publish:
runs-on: ubuntu-latest
needs: state
if: needs.state.outputs.version_changed != 'not_changed'
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Publish to npm
run: |
npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_ACCESS_TOKEN }}
npm run publish-to-npm