workflow changes 6

This commit is contained in:
Dethrace Labs 2022-09-20 20:56:36 +12:00
parent 5172d25013
commit 190145ad3d
1 changed files with 24 additions and 20 deletions

View File

@ -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: