Skip to content

Commit

Permalink
ci: set prerelease before the build completes
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Feb 25, 2023
1 parent 4dd753d commit 81e10f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 17 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: auto changelog

on:
push:
tags:
- '*'

jobs:
changelog:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: npx changelogithub # or [email protected] if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.MY_TOKEN}}
35 changes: 18 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
name: release

on:
push:
tags:
- '*'
release:
types: [ published ]

jobs:
changelog:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- run: npx changelogithub # or [email protected] if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.MY_TOKEN}}
release:
needs: changelog
strategy:
matrix:
platform: [ubuntu-latest]
go-version: [1.19]
platform: [ ubuntu-latest ]
go-version: [ 1.19 ]
name: Release
runs-on: ${{ matrix.platform }}
steps:
- name: prerelease
uses: irongut/[email protected]
with:
token: ${{ secrets.MY_TOKEN }}
id: ${{ github.event.release.id }}
prerelease: true

- name: Setup Go
uses: actions/setup-go@v3
with:
Expand All @@ -47,6 +41,13 @@ jobs:
run: |
bash build.sh release
- name: prerelease
uses: irongut/[email protected]
with:
token: ${{ secrets.MY_TOKEN }}
id: ${{ github.event.release.id }}
prerelease: false

- name: Release
uses: softprops/action-gh-release@v1
with:
Expand Down

0 comments on commit 81e10f8

Please sign in to comment.