-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.09 KB
/
build-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
name: Build Release
on:
push:
tags:
- "v*" # Trigger the workflow on tag pushes starting with "v".
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Code
uses: actions/checkout@v3 # Checkout the repository code.
- name: Get Tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
# Extract and store the tag from the GITHUB_REF environment variable.
- name: Build Zip
run: bash bin/build-zip.sh
# Execute a script to build a zip file.
- name: Create Release & Upload Assets
id: create_release
uses: ncipollo/release-action@v1 # Use the ncipollo release action.
with:
token: ${{ env.GITHUB_TOKEN }} # Use the GitHub token for authentication.
name: ${{ steps.tag.outputs.tag }} # Set the release name.
tag: ${{ steps.tag.outputs.tag }} # Set the release tag.
artifacts: vhc-wc-sales-report.zip # Upload the vhc-wc-sales-report.zip file as an asset.