forked from Checkmarx/kics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add pre release workflow (Checkmarx#1758)
* add pre release workflow * remove trailing spaces * Update prerelease.yml
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
pre-release: | ||
name: "Pre Release" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: 'Get Previous tag' | ||
uses: oprypin/find-latest-tag@v1 | ||
with: | ||
repository: ${{ github.repository }} | ||
releases-only: true | ||
id: previoustag | ||
- name: 'Get next minor version' | ||
id: semvers | ||
uses: "WyriHaximus/github-action-next-semvers@master" | ||
with: | ||
version: ${{ steps.previoustag.outputs.tag }} | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
if: contains(steps.previoustag.outputs.tag, '-rc') | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "${{ steps.previoustag.outputs.tag }}" | ||
prerelease: true | ||
title: "Pre release ${{ steps.previoustag.outputs.tag }}" | ||
- uses: "marvinpinto/action-automatic-releases@latest" | ||
if: "!contains(steps.previoustag.outputs.tag, '-rc')" | ||
with: | ||
repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
automatic_release_tag: "${{ steps.semvers.outputs.v_minor }}-rc" | ||
prerelease: true | ||
title: "Pre release ${{ steps.semvers.outputs.v_minor }}-rc" | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- | ||
name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,5 @@ archives: | |
386: x32 | ||
files: | ||
- assets/queries | ||
release: | ||
prerelease: auto |