forked from violentmonkey/violentmonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (55 loc) · 2.03 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
52
53
54
55
56
57
58
59
60
61
name: CI
on:
workflow_dispatch:
push:
branches: [master]
tags-ignore:
- 'v*' # version-tagged commits are releases which have their own workflow
paths-ignore:
- '.github/**' # this ci.yml is also excluded so you need to re-run it explicitly if necessary
- src/types.d.ts
- LICENSE
- README.md
pull_request:
branches: [master]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1 # v1 keeps tags
with:
fetch-depth: 100 # for revision index in version and the `has-changed-path` action
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: Build
env:
SYNC_DROPBOX_CLIENT_ID: ${{ secrets.SYNC_DROPBOX_CLIENT_ID }}
SYNC_GOOGLE_CLIENT_ID: ${{ secrets.SYNC_GOOGLE_CLIENT_ID }}
SYNC_GOOGLE_CLIENT_SECRET: ${{ secrets.SYNC_GOOGLE_CLIENT_SECRET }}
SYNC_GOOGLE_DESKTOP_ID: ${{ secrets.SYNC_GOOGLE_DESKTOP_ID }}
SYNC_GOOGLE_DESKTOP_SECRET: ${{ secrets.SYNC_GOOGLE_DESKTOP_SECRET }}
SYNC_ONEDRIVE_CLIENT_ID: ${{ secrets.SYNC_ONEDRIVE_CLIENT_ID }}
SYNC_ONEDRIVE_CLIENT_SECRET: ${{ secrets.SYNC_ONEDRIVE_CLIENT_SECRET }}
run: yarn && yarn build
- name: Get version and SHA
run: node scripts/action-helper.js ci
- name: Upload Artifact
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: 'Violentmonkey-test-webext-${{ env.GIT_DESCRIBE }}'
path: 'dist/*'
if-no-files-found: error
- name: Upload to Transifex - check src
if: github.event_name == 'push' || github.event.pull_request.merged == true
uses: marceloprado/has-changed-path@v1.0.1
id: changed-path-src
with:
paths: src
- name: Upload to Transifex
if: steps.changed-path-src.outputs.changed == 'true'
run: node scripts/transifex.mjs update
env:
TRANSIFEX_TOKEN: ${{ secrets.TRANSIFEX_TOKEN }}