Skip to content

Instantly share code, notes, and snippets.

@vinhjaxt
Created March 18, 2023 06:11
Show Gist options
  • Select an option

  • Save vinhjaxt/78dbe01a3b38eaa8beba0d84a26e02b7 to your computer and use it in GitHub Desktop.

Select an option

Save vinhjaxt/78dbe01a3b38eaa8beba0d84a26e02b7 to your computer and use it in GitHub Desktop.
Github release workflow
name: Build
on:
issues:
types: [opened, reopened, closed]
issue_comment:
types: [created, edited, deleted]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Main
run: |
# do build
# Create release
- name: Generate release tag
id: tag
run: |
echo "release_tag=ActionBuild_$(date +"%Y.%m.%d_%H-%M-%S")" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.release_tag }}
files: |
./file_path*
# Create release
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Sets permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment