generated from pot-app/pot-app-translate-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (33 loc) · 990 Bytes
/
build.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: Build
on: push
permissions: write-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install zip
run: sudo apt-get install -y jq
- id: getname
run: |
echo "NAME=$(cat info.json | jq '.id' | tr -d '"')" >> "$GITHUB_ENV"
echo "ICON=$(cat info.json | jq '.icon' | tr -d '"')" >> "$GITHUB_ENV"
- uses: vimtor/action-zip@v1
with:
files: info.json ${{ env.ICON }} main.js
dest: ${{ env.NAME }}.potext
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.NAME }}.potext
path: "*.potext"
if-no-files-found: error
- name: Upload Release
if: startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: "*.potext"