-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.38 KB
/
release.yaml
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
name: Release & Publish New Version
on:
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install Bazel
run: npm --global install @bazel/bazelisk@latest
- name: Test Packages
env:
NPM_TOKEN: ""
run: bazel test //... --config ci
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish NPM Packages
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NEXT_VERSION: ${{ steps.tag_version.outputs.new_version }}
run: |
targets=$(bazel query 'attr(tags, "\bnpm_public\b", //packages/...)')
for target in ${targets[@]}; do
echo "Publishing $target"
bazel run $target.publish --config ci -- --access public
done
- name: Create a GitHub release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag_version.outputs.new_tag }}
release_name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}