-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
50 lines (41 loc) · 1.2 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
46
47
48
49
50
name: Release & Publish
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE }}"
cache: npm
- name: Install npm dependencies
run: npm ci
- name: Build distribution files
run: npm run production
- name: Zip distribution files
uses: montudor/action-zip@v1
with:
args: "zip -qq admin-lte-${{env.RELEASE_VERSION}}.zip -d dist"
- name: Create changelog text
id: changelog
uses: endaft/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_types: other,doc,chore
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: ${{ steps.changelog.outputs.changelog }}
files: |
admin-lte.${{env.RELEASE_VERSION}}.zip