Skip to content

Commit

Permalink
add pre release workflow (Checkmarx#1758)
Browse files Browse the repository at this point in the history
* add pre release workflow

* remove trailing spaces

* Update prerelease.yml
  • Loading branch information
elit-cx authored Jan 7, 2021
1 parent ea4d40b commit a78474a
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/prerelease.yml
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 }}
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ archives:
386: x32
files:
- assets/queries
release:
prerelease: auto

0 comments on commit a78474a

Please sign in to comment.