-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 900 Bytes
/
release.yml
File metadata and controls
41 lines (33 loc) · 900 Bytes
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
name: Release
on:
push:
tags: ['*']
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- name: Create package
run: |
rm -rf *.tar.gz
npx --yes wspackager@latest
- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v2.0.0
with:
files: "*.tar.gz"
- name: On Build Failure
if: steps.check_files.outputs.files_exists == 'false'
run: |
echo "Packaging FAILED" && exit 1
- name: Release
uses: softprops/action-gh-release@v2.0.9
if: startsWith(github.ref, 'refs/tags/') && steps.check_files.outputs.files_exists == 'true'
with:
files: "*.tar.gz"