-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (51 loc) · 1.66 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
name: Publish
on:
release:
types: [published]
jobs:
publish-v1:
if: ${{ startsWith(github.event.release.tag_name, 'v1') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Install NPM dependencies
run: npm ci
# At this point, the index.json is manually updated and committed for v1
# No need to generate the addons list
- name: Publish to NPM
run: npm publish --workspace stremio-official-addons --access public --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
publish-v2:
if: ${{ startsWith(github.event.release.tag_name, 'v2') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
registry-url: https://registry.npmjs.org/
- name: Rust setup (1.61)
uses: dtolnay/[email protected]
- name: Install NPM dependencies
run: npm ci
- name: Build addons list
run: npm run --workspace official-addons-v2 build
- name: Publish to NPM
run: npm publish --workspace official-addons-v2 --access public --dry-run
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build and publish crate to crates.io
run: cargo publish -p stremio-official-addons --allow-dirty --token "$CARGO_AUTH_TOKEN" --dry-run
env:
CARGO_AUTH_TOKEN: ${{ secrets.CRATES_IO_PUBLISH_TOKEN }}