feat: update workflows to include master branch

This commit is contained in:
Prad Nukala 2024-09-27 22:57:39 -04:00
parent c4505d98c1
commit f5ac4604f1
7 changed files with 37 additions and 87 deletions

View File

@ -2,8 +2,8 @@ name: Publish to buf.build/didao/sonr
on:
push:
branches:
- master
- develop
- master
permissions:
contents: write

View File

@ -1,11 +1,9 @@
name: Publish Docker Image
# NOTE: For this action to work, you must enable write permissions in your github repository settings.
# Settings -> Actions -> General. "Workflow Permissions". Select "Read and write permissions".
# If you forget to enable, the action will fail on push with a 401 error. Just re-run the failed action after enabling.
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # ignore rc

View File

@ -1,29 +0,0 @@
name: PR Merged - Bump Version and Tag
on:
pull_request:
types:
- closed
branches:
- develop
permissions:
contents: write
jobs:
bump-version-and-tag:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'feature/')
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version and update changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Push changes and tag
run: git push && git push --tags

View File

@ -18,13 +18,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v3
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- name: Clean up dist directory
run: rm -rf dist

View File

@ -1,24 +0,0 @@
name: Gitflow Sync
on:
# To create pull requests.
push:
# To merge pull requests if not possible during the push run. Remove if `auto-merge` is `false`.
pull_request_review:
check_run:
types: [completed]
permissions:
contents: read
pull-requests: write
jobs:
build:
name: Gitflow
runs-on: ubuntu-latest
steps:
- uses: Logerfo/gitflow-action@0.0.5
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # The `GITHUB_TOKEN` secret.
dev: develop
master: master
release: release

View File

@ -1,26 +0,0 @@
name: Unit tests
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: 1.22
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Tests
run: make test

31
.github/workflows/version-bump.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Bump version
on:
push:
branches:
- master
jobs:
bump-version:
if: "!startsWith(github.event.head_commit.message, 'bump:')"
runs-on: ubuntu-latest
name: "Bump version and create changelog with commitizen"
steps:
- name: Check out
uses: actions/checkout@v4
with:
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
- name: Tests
run: make test
- name: Create bump and changelog
uses: commitizen-tools/commitizen-action@master
with:
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}