style: ♻️ fix project struct #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
name: release please | |
outputs: | |
releases_created: ${{ steps.release-please.outputs.releases_created }} | |
tag_name: ${{ steps.release-please.outputs[format('{0}--tag_name', steps.get-path.outputs.path)] }} | |
path: ${{ steps.get-path.outputs.path }} | |
steps: | |
- name: Release Please | |
uses: googleapis/release-please-action@v4 | |
id: release-please | |
with: | |
config-file: .release-please/release-please-config.json | |
manifest-file: .release-please/.release-please-manifest.json | |
- name: Get Path | |
id: get-path | |
if: ${{ steps.release-please.outputs.releases_created == 'true' }} | |
run: | | |
echo "path=${{ fromJson(steps.release-please.outputs.paths_released)[0] }}" >> $GITHUB_OUTPUT | |
goreleaser: | |
runs-on: ubuntu-latest | |
name: release | |
needs: release-please | |
if: ${{ needs.release-please.outputs.releases_created == 'true' }} | |
steps: | |
- name: Checkout | |
run: | | |
git version | |
git clone "${{ github.event.repository.html_url }}" /home/runner/work/kook-go/kook-go | |
git checkout "${{ github.ref }}" | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.21' | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: latest | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |