mirror of
https://github.com/ncarlier/webhookd.git
synced 2025-04-09 15:14:02 +00:00
chore(ci): review build steps
This commit is contained in:
parent
ee507faa95
commit
27947218e7
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
|
@ -3,7 +3,6 @@ name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
tags: [ 'v*' ]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
|
|
||||||
|
@ -14,23 +13,34 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.21
|
go-version: 1.21
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make build test
|
run: make build test
|
||||||
|
release:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Conventional CHANGELOG
|
||||||
|
id: changelog
|
||||||
|
uses: TriPSs/conventional-changelog-action@v3
|
||||||
|
if: github.ref == 'refs/heads/master'
|
||||||
|
with:
|
||||||
|
github-token: ${{ secrets.github_token }}
|
||||||
|
|
||||||
- name: Distribution
|
- name: Distribution
|
||||||
run: make distribution
|
run: make distribution
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
|
||||||
with:
|
with:
|
||||||
|
body: ${{ steps.changelog.outputs.clean_changelog }}
|
||||||
|
tag_name: ${{ steps.changelog.outputs.tag }}
|
||||||
|
name: ${{ steps.changelog.outputs.tag }}
|
||||||
files: |
|
files: |
|
||||||
release/webhookd-linux-amd64.tgz
|
release/webhookd-linux-amd64.tgz
|
||||||
release/webhookd-linux-arm64.tgz
|
release/webhookd-linux-arm64.tgz
|
||||||
|
|
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
|
@ -1,11 +1,11 @@
|
||||||
name: Publish Docker image
|
name: Publish Docker image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
push_to_registry:
|
push_to_registry:
|
||||||
|
|
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
@ -1,27 +0,0 @@
|
||||||
name: Releases
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
changelog:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: conventional Changelog Action
|
|
||||||
id: changelog
|
|
||||||
uses: TriPSs/conventional-changelog-action@v3
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.github_token }}
|
|
||||||
|
|
||||||
- name: create release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
if: ${{ steps.changelog.outputs.skipped == 'false' }}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.github_token }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
release_name: ${{ steps.changelog.outputs.tag }}
|
|
||||||
body: ${{ steps.changelog.outputs.clean_changelog }}
|
|
Loading…
Reference in New Issue
Block a user