php-fpm-exporter/.github/workflows/release.yml
dependabot[bot] 0c12503832
chore(deps): bump actions/setup-go from 2.1.4 to 3.0.0 (#229)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-02 22:57:31 +10:00

54 lines
1.3 KiB
YAML

name: Release
on: [workflow_dispatch]
jobs:
tag:
name: Tag
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Setup Node.js for use with actions
uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install semantic-release
run: yarn global add --no-progress --non-interactive "semantic-release" "@semantic-release/exec"
- name: Run semantic-release
run: $(yarn global bin)/semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
runs-on: ubuntu-latest
# if: startsWith(github.ref, 'refs/tags/')
needs: [tag]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3.0.0
with:
go-version: 1.17
id: go
- name: Login to DockerHub
uses: docker/login-action@v1.14.1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASS }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2.9.1
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}