forked from EhTagTranslation/EhSyringe
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (58 loc) · 1.7 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
62
63
name: ci
on:
push:
branches-ignore: [release]
tags: ['*']
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
uses: NullVoxPopuli/action-setup-pnpm@v2
with:
node-version: 18
pnpm-version: 8
- name: Build
run: |
pnpm run build:firefox
pnpm run build:chrome
pnpm run build:monkey
- uses: actions/upload-artifact@v3
with:
name: releases
path: releases/
deploy:
needs: build
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/')
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: releases
path: releases/
- name: Publish to github release
uses: ncipollo/release-action@v1.13.0
with:
allowUpdates: true
artifacts: releases/*
body: |
[更新日志](https://github.com/EhTagTranslation/EhSyringe/blob/master/CHANGELOG.md)
prerelease: ${{ contains(github.event.ref, '-') }}
replacesArtifacts: true
- name: Commit release mirror
run: >
cd ./releases
&& git init
&& git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
&& git config user.name 'github-actions[bot]'
&& git add .
&& git commit -am 'Release for https://github.com/EhTagTranslation/EhSyringe/tree/${{ github.event.ref }}'
- name: Push to release branch
uses: ad-m/github-push-action@master
with:
branch: release
force: true
directory: releases/