workflow changes 6
This commit is contained in:
parent
5172d25013
commit
190145ad3d
|
|
@ -4,21 +4,21 @@ on: [push, pull_request]
|
|||
|
||||
jobs:
|
||||
|
||||
bump-tag:
|
||||
if: github.ref == 'refs/heads/main'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: '0'
|
||||
- id: bump_version
|
||||
name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@1.46.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
WITH_V: true
|
||||
outputs:
|
||||
new_tag: ${{ steps.bump_version.outputs.new_tag }}
|
||||
# bump-tag:
|
||||
# if: github.ref == 'refs/heads/main'
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: '0'
|
||||
# - id: bump_version
|
||||
# name: Bump version and push tag
|
||||
# uses: anothrNick/github-tag-action@1.46.0
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# WITH_V: true
|
||||
# outputs:
|
||||
# new_tag: ${{ steps.bump_version.outputs.new_tag }}
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-18.04
|
||||
|
|
@ -103,22 +103,26 @@ jobs:
|
|||
|
||||
create-release:
|
||||
needs: [bump-tag, build-linux, build-macos, build-windows]
|
||||
if: needs.bump-tag.outputs.new_tag != ''
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# - name: Fetch build artifacts
|
||||
# uses: actions/download-artifact@v1
|
||||
# with:
|
||||
## name: artifacts
|
||||
- name: "Build Changelog"
|
||||
id: build_changelog
|
||||
uses: mikepenz/release-changelog-builder-action@v3
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create release
|
||||
id: create-release
|
||||
id: create_release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
draft: false
|
||||
prerelease: false
|
||||
name: ${{needs.bump-tag.outputs.new_tag}}
|
||||
tag_name: ${{needs.bump-tag.outputs.new_tag}}
|
||||
generate_release_notes: true
|
||||
body: ${{steps.build_changelog.outputs.changelog}}
|
||||
# generate_release_notes: true
|
||||
# - name: Upload linux-amd64 artifact
|
||||
# uses: actions/upload-release-asset@v1.0.1
|
||||
# env:
|
||||
|
|
|
|||
Loading…
Reference in New Issue