Skip to content

Commit

Permalink
maybe
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversun9 committed Nov 1, 2023
1 parent 3b6f90f commit ccf1824
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
name: Release
name: Release Prepare
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version you intend to release without leading 'v' (eg x.y.z and not vx.y.z)
pull_request:
types: [closed]
push:
branches:
- "release/**"
- "next/**"
tags:
- v*
release:
types: [created]

env:
VERSION: ${{ github.event.inputs.version }}
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release_perform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release Perform
on:
workflow_dispatch:
pull_request:
types: [closed]

jobs:
tag:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release') }}
steps:
- name: Set VERSION variable from tag
run: |
VERSION=${{github.head_ref}}
echo "VERSION=${VERSION##*/}" >> $GITHUB_ENV
- name: Checkout repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
# skip generating assets, which potentially requires setup-go
- name: Fetch Changelog
run: .github/actions/changelog-action/entrypoint.sh > ${{env.VERSION}}-CHANGELOG.md
- run: gh release create --notes-file ${{env.VERSION}}-CHANGELOG.md ${{env.VERSION}} ./random.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# placeholder for slack notification

0 comments on commit ccf1824

Please sign in to comment.