-
Notifications
You must be signed in to change notification settings - Fork 38
45 lines (43 loc) · 1.52 KB
/
release-beta.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
name: Release Beta
on:
# New release tagged.
push:
tags:
- 'v[0-9]+.[0-9]+.*'
# Manual trigger.
workflow_dispatch:
jobs:
release-beta:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
permissions:
# This is broad, but unfortunately it is required for creating
# releases.
contents: write
steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: Check Manifest
run: |
MANIFEST_VERSION=$(cat manifest-beta.json | python3 -c "import sys, json; print(json.load(sys.stdin)['version'])")
TAG_VERSION=${{ github.ref_name }}
test "v${MANIFEST_VERSION}" = "${TAG_VERSION}"
- run: bazel build ...
- run: bazel test --test_output=errors ...
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
fail_on_unmatched_files: true
# bazel-bin symlink may not exist
files: |
bazel-out/k8-fastbuild/bin/chrome-ssh-agent-beta.zip
bazel-out/k8-fastbuild/bin/chrome-ssh-agent.zip
- name: Publish to Webstore
uses: mnao305/[email protected]
with:
file-path: bazel-out/k8-fastbuild/bin/chrome-ssh-agent-beta.zip
extension-id: onabphcdiffmanfdhkihllckikaljmhh
client-id: ${{ secrets.WEBSTORE_CLIENT_ID }}
client-secret: ${{ secrets.WEBSTORE_CLIENT_SECRET }}
refresh-token: ${{ secrets.WEBSTORE_REFRESH_TOKEN }}