This commit is contained in:
Matthew R Kasun 2023-02-25 08:01:39 -05:00
parent bc39f1bc3b
commit f4067b29ae
3 changed files with 45 additions and 53 deletions

View file

@ -1,53 +0,0 @@
name: PreRelease
on:
workflow_dispatch:
inputs:
version:
description: "new version number"
required: true
jobs:
release-branch:
runs-on: ubuntu-latest
steps:
- name: checkout develop
uses: actions/checkout@v3
with:
ref: develop
- name: setup go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: setup git
run: |
git config user.name "Github Actions"
git config user.emaail "info@netmaker.io"
- name: create release Branch
run: |
git switch -c release_${{ github.event.inputs.version }}
git tag -f ${{ github.event.inputs.version }}
git push origin --tags release_${{ github.event.inputs.version }}
create-prelease:
runs-on: ubuntu-latest
needs: release-branch
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: release_${{ github.event.inputs.version}}
fetch-depth: 0
- name: Get Tags
run: |
git fetch --force --tags
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
args: release --clean --release-notes release.md -f .goreleaser.prerelease.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

41
.github/workflows/upgraderelease.yml vendored Normal file
View file

@ -0,0 +1,41 @@
name: UpgradeRelease
on:
workflow_dispatch:
inputs:
version:
description: "release/version to update"
required: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: release_${{ github.event.inputs.version }}
fetch-depth: 0
- run: |
git fetch --force --tags
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: goreleaser
uses: goreleaser/goreleaser-action@v4
with:
args: release --clean --release-notes release.md -f .goreleaser.update.yaml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
packages:
uses: ./.github/workflows/packages.yml
with:
version: ${{ github.event.inputs.version }}
pull-request:
uses: ./.github/workflows/pull-request.yml
with:
version: ${{ github.event.inputs.version }}

4
.goreleaser.update.yaml Normal file
View file

@ -0,0 +1,4 @@
builds:
- skip: true
release:
prerelease: false