Skip to content

Merge pull request #62 from nekottyo/use-setup-go #72

Merge pull request #62 from nekottyo/use-setup-go

Merge pull request #62 from nekottyo/use-setup-go #72

Workflow file for this run

# ref. https://github.com/haya14busa/action-update-semver/blob/master/.github/workflows/release.yml
name: release
on:
push:
branches:
- master
tags:
- 'v*.*.*'
pull_request:
types:
- labeled
jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- uses: actions/setup-go@v4
with:
go-version: 1.21
- name: make action-release
run: make action-release
- name: Build Alfred Workflow
id: alfred_builder
uses: mperezi/build-alfred-workflow@v1
with:
workflow_dir: ./release
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
uses: haya14busa/action-bumpr@v1
- name: Create Release
if: "!steps.bumpr.outputs.skip"
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.bumpr.outputs.next_version }}
release_name: ${{ steps.bumpr.outputs.next_version }}
draft: false
prerelease: false
- name: Upload Alfred Workflow
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.alfred_builder.outputs.workflow_file }}
asset_name: ${{ steps.alfred_builder.outputs.workflow_file }}
asset_content_type: application/zip
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1