-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (65 loc) · 2 KB
/
generator.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
64
65
66
67
68
69
70
71
72
73
74
75
76
name: "Generator"
on:
workflow_dispatch:
inputs:
# https://github.com/MetaCubeX/Clash.Meta v1.14.1
# net-proxy/clash-meta/clash-meta-1.14.1.ebuild
# release artiface: ${PN}-${PV}-deps.tar.xz: clash-meta-1.14.1-deps.tar.xz
# release tag: ${P}=${PN}-${PV}: clash-meta-1.14.1
REPO:
description: "github repo name: MetaCubeX/Clash.Meta"
required: true
TAG:
description: "github tag: v1.14.1"
required: true
P:
description: "P in ebuild: clash-meta-1.14.1"
required: true
jobs:
Generator:
permissions: write-all # required by push tag
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout input repo
uses: actions/checkout@v3
with:
repository: ${{ inputs.REPO }}
ref: ${{ inputs.TAG }}
fetch-depth: 0
path: "input"
- name: Configure node
uses: actions/setup-node@v3
with:
node-version: 16
- name: create tag
env:
P: ${{ inputs.P }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git tag --delete ${P} || echo yes
git tag ${P} -m "${P}-node_modules.tar.xz"
- name: Generate node_modules.tar.xz
env:
P: ${{ inputs.P }}
run: |
cd input
npm install
tar --create --auto-compress --file /tmp/${P}-node_modules.tar.xz node_modules
rm -rf node_modules
- name: push tag
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
tags: true
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
/tmp/${{ inputs.P }}-node_modules.tar.xz
tag_name: ${{ inputs.P }}