Skip to content

Commit

Permalink
create release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
chathurace authored Sep 19, 2024
1 parent 8ea19f1 commit 393dae2
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/blank.yml
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

0 comments on commit 393dae2

Please sign in to comment.