-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ea19f1
commit 393dae2
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Pack and Release | ||
|
||
on: | ||
workflow_dispatch: # Manually trigger the workflow | ||
inputs: | ||
tag: | ||
description: 'Tag for the release' | ||
required: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Install GitHub CLI | ||
- name: Install GitHub CLI | ||
run: sudo apt-get install gh | ||
|
||
# Zip files excluding issue_template.md | ||
- name: Create a zip excluding issue_template.md | ||
run: | | ||
zip -r bal_project.zip . -x "./.github/ISSUE_TEMPLATE.md" | ||
# Authenticate GitHub CLI using the default GitHub token | ||
- name: Authenticate GitHub CLI | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
|
||
# Create a GitHub release using a manually provided tag | ||
- name: Create GitHub Release | ||
run: gh release create ${{ github.event.inputs.tag }} bal_project.zip --title "Release ${{ github.event.inputs.tag }}" --notes "Automated release notes" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Optionally upload additional assets | ||
- name: Upload additional assets | ||
run: gh release upload ${{ github.event.inputs.tag }} additional_asset.txt |