-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.16 KB
/
release.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
# SPDX-FileCopyrightText: 2023 Firebot Gambling Script Contributors
#
# SPDX-License-Identifier: EUPL-1.2
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Use Node.js ${{ env.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node }}
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Install zip
run: |
sudo apt-get update
sudo apt-get -y install zip
- name: Create Release Zip
run: |
cp README.adoc dist/
cp CHANGELOG.adoc dist/
cp LICENSE dist/
mv dist gambling-script
md5sum gambling-script/*
zip -r gambling-script-${{ env.RELEASE_VERSION }}.zip gambling-script
- name: Release
uses: softprops/action-gh-release@v2.2.0
if: startsWith(github.ref, 'refs/tags/')
with:
files: gambling-script-${{ env.RELEASE_VERSION }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}