-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (67 loc) · 1.84 KB
/
Copy pathrelease.yaml
File metadata and controls
69 lines (67 loc) · 1.84 KB
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
#
# Perform a github release
# - checkout a git tag
# - do build, creating package
# - upload package to github
#
name: release
on:
workflow_dispatch:
inputs:
tagName:
description: 'Tag to release'
required: true
default: 'v-testing-tag'
draft:
description: 'Draft release?'
required: true
default: 'false'
prerelease:
description: 'Prerelease?'
required: true
default: 'true'
jobs:
do-build:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: .
steps:
- name: checkout code
uses: actions/checkout@v2
with:
ref: '${{github.event.inputs.tagName}}'
- name: debug
run: |
echo "$GITHUB_REF";
echo "$GITHUB_HEAD_REF";
echo "$GITHUB_BASE_REF";
echo "${{github.event.inputs.tagName}}";
#- name: check if tag is valid
# if: ${{!(startsWith(github.ref, 'refs/tags/'))}}
# run: |
# echo "A tag needs to be given"; exit 1;
- name: check permission
uses: 74th/workflow-permission-action@1.0.0
with:
listfile: .github/workflows/super-users
- name: setup node
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: build package
env:
VERSION: "${{github.event.inputs.tagName}}"
run: |
chmod +x ./build-package.sh;
./build-package.sh
- name: release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: '${{github.event.inputs.draft}}'
prerelease: '${{github.event.inputs.prerelease}}'
tag_name: '${{github.event.inputs.tagName}}'
files: |
fuyuko-${{github.event.inputs.tagName}}.zip