-
Notifications
You must be signed in to change notification settings - Fork 73
40 lines (31 loc) · 1.13 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
name: release
on:
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
types: [published]
jobs:
build:
name: Build the extension
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: gacts/github-slug@v1
id: slug
- uses: actions/setup-node@v4
with: {node-version: '16'}
- uses: actions/cache@v4
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --no-progress --non-interactive
- name: Set the extension version
run: yarn version --no-git-tag-version --no-commit-hooks --new-version "${{ steps.slug.outputs.version-semantic }}"
- run: yarn build
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist.zip
asset_name: random-user-agent.zip
tag: ${{ github.ref }}