-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (30 loc) · 1.01 KB
/
publish-luogu.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
name: Publish to Luogu
on:
push:
branches:
- main
jobs:
publish:
environment: publish
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: pack plugin
id: pack
shell: bash
run: |
tar zcvf plugin.tgz * --transform 's,^,luogu/,'
ver=$(jq -r .version package.json)
echo "Current version: $ver"
echo "version=$ver" >> $GITHUB_OUTPUT
- name: publish
uses: tvrcgo/upload-to-oss@d805009d52698055a35b19c14d190a02d04a4f43
with:
key-id: ${{ secrets.ALIOSS_AK }}
key-secret: ${{ secrets.ALIOSS_SK }}
region: oss-cn-hangzhou
bucket: luogu
assets: |
plugin.tgz:/lgapi/hydro/hydroplugin-luogu-latest.tgz
plugin.tgz:/lgapi/hydro/hydroplugin-luogu-${{ steps.pack.outputs.version }}.tgz