-
Notifications
You must be signed in to change notification settings - Fork 15
57 lines (51 loc) · 1.65 KB
/
master.yml
File metadata and controls
57 lines (51 loc) · 1.65 KB
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
# When any change is pushed on master, it triggers a beta
# version release with the @next tag
#
# When a tag is published, it triggers the release flow,
# which takes the version which is released and converts
# it into the @latest tag
name: Process master branch updates
on:
push:
branches:
- master
jobs:
prepare-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
git config user.name bhoos-devops
git config user.email devops@bhoos.com
- uses: actions/setup-node@v1
with:
node-version: '18.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@bhoos'
- name: Install Dependencies and publish packages
run: |
yarn
yarn version --patch
yarn publish . --tag next
version=$(node -p "require('./package.json').version")
echo "RELEASE_VERSION=v${version}" >> $GITHUB_ENV
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: "workflow_config/config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release for moving to production
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
commit: master
body: ${{steps.github_release.outputs.changelog}}
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}