Skip to content

Merge pull request from GHSA-5pf6-2qwx-pxm2 #13

Merge pull request from GHSA-5pf6-2qwx-pxm2

Merge pull request from GHSA-5pf6-2qwx-pxm2 #13

Workflow file for this run

name: Release Pipeline
on:
push:
branches:
- release-*
jobs:
semver:
name: Calculate Next Release
runs-on: ubuntu-latest
outputs:
next: ${{ steps.ggsv.outputs.next}}
steps:
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: v2/go.sum
- name: Install Dependencies
run: go install tableflip.dev/ggsv@latest
- name: Look at Ref
id: ggsv
run: |
NEXT=`ggsv next-patch $GITHUB_SERVER_URL/${{ github.repository }}.git ${{ github.ref }}`
echo "::set-output name=next::$NEXT"
mainmodule:
name: Release Main Module
runs-on: ubuntu-latest
needs: semver
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Create Release ${{ needs.semver.outputs.next }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.semver.outputs.next }}
release_name: Release ${{ needs.semver.outputs.next }}
prerelease: false
submodules:
name: Release Sub-Modules
runs-on: ubuntu-latest
needs:
- semver
- mainmodule
env:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: v2/go.sum
- run: git pull
- name: Update Modules
run: |
./hack/tag-release.sh
- name: Commit Repoint
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git diff-index --quiet HEAD || (git commit -a -m "Repoint modules for release ${{ needs.semver.outputs.next }}." --allow-empty && git push)
- name: Tag Modules
run: ./hack/tag-release.sh --tag --push
examples:
name: Update Examples
runs-on: ubuntu-latest
needs:
- semver
- mainmodule
- submodules
env:
VERSION: ${{ needs.semver.outputs.next }}
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
cache-dependency-path: v2/go.sum
- name: Checkout Code
uses: actions/checkout@v4
- run: git pull
- name: Update Examples
run: ./hack/tag-release.sh --samples
- name: Commit Repoint
env:
tag: ${{ matrix.module }}/${{ needs.semver.outputs.next }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git diff-index --quiet HEAD || (git commit -a -m "Repoint examples, post release ${{ needs.semver.outputs.next }}." --allow-empty && git push)