Skip to content

Commit

Permalink
chore(ci): rollback auto release
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Oct 4, 2023
1 parent 4ce655f commit 13ef163
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 152 deletions.
86 changes: 60 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,87 @@ name: Build
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]

jobs:
# Build and test project
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: 1.21
- name: Test
run: make build test
go-version: stable
- run: make build test

# Create project release if tagged
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: build
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Conventional CHANGELOG
- uses: actions/setup-go@v4
with:
go-version: stable
- uses: actions/setup-node@v3
with:
node-version: current
- run: npm install -g standard-changelog
- run: make distribution
- name: get CHANGELOG
id: changelog
uses: TriPSs/conventional-changelog-action@v3
if: github.ref == 'refs/heads/master'
with:
github-token: ${{ secrets.github_token }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.21
- name: Distribution
run: make distribution
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
- name: Release
uses: softprops/action-gh-release@v1
if: github.ref == 'refs/heads/master' && steps.changelog.outputs.skipped == 'false'
with:
body: ${{ steps.changelog.outputs.clean_changelog }}
tag_name: ${{ steps.changelog.outputs.tag }}
name: ${{ steps.changelog.outputs.tag }}
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
tag: ${{ github.ref_name }}
- uses: softprops/action-gh-release@v1
with:
body: ${{ steps.changelog.outputs.changes }}
files: |
release/webhookd-linux-amd64.tgz
release/webhookd-linux-arm64.tgz
release/webhookd-linux-arm.tgz
release/webhookd-darwin-amd64.tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# Publish Docker image
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ncarlier/feedpushr
tags: |
type=edge
type=semver,pattern={{version}}
- uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64,arm
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
63 changes: 0 additions & 63 deletions .github/workflows/docker.yml

This file was deleted.

60 changes: 0 additions & 60 deletions CHANGELOG.md

This file was deleted.

3 changes: 0 additions & 3 deletions package.json

This file was deleted.

0 comments on commit 13ef163

Please sign in to comment.