[action] let goreleaser create the release

pull/485/head v0.15.9-rc4
max furman 3 years ago
parent 049be1707a
commit 6920af0521

@ -7,43 +7,30 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs: jobs:
lintTestBuild: lint_test_build:
name: Lint, Test, Build name: Lint, Test, Build
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs:
is_prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
steps: steps:
- name: Checkout -
name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Setup Go -
name: Setup Go
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: '^1.15.6' go-version: '^1.15.6'
- name: Install Deps -
name: Install Deps
id: install-deps id: install-deps
run: sudo apt-get -y install libpcsclite-dev run: sudo apt-get -y install libpcsclite-dev
- name: Lint, Test, Build -
name: Lint, Test, Build
id: lintTestBuild id: lintTestBuild
run: V=1 make -j1 bootstrap travis run: V=1 make -j1 bootstrap travis
-
create_release: name: Is Pre-release
name: Create Release
runs-on: ubuntu-latest
needs: lintTestBuild
outputs:
version: ${{ steps.extract-tag.outputs.VERSION }}
vversion: ${{ steps.extract-tag.outputs.VVERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
is_prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract Tag Names
id: extract-tag
run: |
VVERSION=${GITHUB_REF#refs/tags/}
VERSION=${GITHUB_REF#refs/tags/v}
echo "::set-output name=VVERSION::${VVERSION}"
echo "::set-output name=VERSION::${VERSION}"
- name: Is Pre-release
id: is_prerelease id: is_prerelease
run: | run: |
set +e set +e
@ -51,21 +38,11 @@ jobs:
OUT=$? OUT=$?
if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi if [ $OUT -eq 0 ]; then IS_PRERELEASE=true; else IS_PRERELEASE=false; fi
echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}" echo "::set-output name=IS_PRERELEASE::${IS_PRERELEASE}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: ${{ steps.is_prerelease.outputs.IS_PRERELEASE }}
build_upload_github_assets: build_upload_github_assets:
name: Build & Upload Mac OS | Linux | Windows Assets To Github Release name: Build & Upload Mac OS | Linux | Windows Assets To Github Release
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: create_release needs: lint_test_build
steps: steps:
- -
name: Checkout name: Checkout

@ -97,7 +97,7 @@ release:
# If set to true, will not auto-publish the release. # If set to true, will not auto-publish the release.
# Default is false. # Default is false.
#draft: true draft: true
# If set to auto, will mark the release as not ready for production # If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1 # in case there is an indicator for this in the tag e.g. v1.0.0-rc1

Loading…
Cancel
Save