Skip to content

Commit

Permalink
chore : generate pre-release on PR merge
Browse files Browse the repository at this point in the history
  • Loading branch information
1xstj committed Dec 5, 2024
1 parent 40603bb commit b5d8d92
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Create Pre-release

on:
push:
branches:
- master

jobs:
create-pre-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get commit info
id: commit_info
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "commit_message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
- name: Create pre-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.commit_info.outputs.sha_short }}
release_name: Pre-release ${{ steps.commit_info.outputs.sha_short }}
body: |
Commit: ${{ steps.commit_info.outputs.commit_message }}
draft: false
prerelease: true

0 comments on commit b5d8d92

Please sign in to comment.