-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (53 loc) · 1.72 KB
/
publish.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
name: publish
on:
push:
tags:
- 'v*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 'latest'
- name: get semantic release info
run: echo new_release_version=${GITHUB_REF:11} >> $GITHUB_ENV
- name: get manifest version
id: manifest
uses: notiz-dev/github-action-json-property@release
with:
path: 'src/manifest.json'
prop_path: 'version'
- name: check manifest version
if: ${{ steps.manifest.outputs.prop != env.new_release_version }}
run: |
echo "invalid manifest version, expected: ${{env.new_release_version}}, got: ${{steps.manifest.outputs.prop}}"
exit 1
- name: get package version
id: package
uses: notiz-dev/github-action-json-property@release
with:
path: 'package.json'
prop_path: 'version'
- name: check package version
if: ${{ steps.package.outputs.prop != env.new_release_version }}
run: |
echo "invalid package version, expected: ${{env.new_release_version}}, got: ${{steps.package.outputs.prop}}"
exit 1
- run: bun install --no-save
- run: bun run setup-ci
- name: update env.json pocketKey
uses: jossef/[email protected]
with:
file: src/env.json
field: pocketKey
value: '${{ secrets.POCKET_KEY }}'
- run: bun run build
- run: bun run zip
- name: upload
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: pile.zip
tag: ${{ github.ref }}