forked from cawa-93/play-shikimori-online
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.57 KB
/
ci.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
---
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Use node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- name: install dependencies
run: npm install
- name: build
run: npm run build
- name: build artifacts
run: cd dist && zip -r chrome.zip . && cp chrome.zip firefox.zip && mv chrome.zip ../ && mv firefox.zip ../
- name: version
run: echo "version=$(npm pkg get version)" >> $GITHUB_OUTPUT
id: version
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ steps.version.outputs.version }}
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload chrome artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./chrome.zip
asset_name: chrome.zip
asset_content_type: application/zip
- name: upload firefox artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./firefox.zip
asset_name: firefox.zip
asset_content_type: application/zip