Commit 7aa88e7f
7aa88e7fdb90Merged
Dmitriy Zhilyaev <[email protected]> ยท 2 years ago ยท 1 file ยท ~1 modified
Description
feat: fix if
Signed-off-by: Dmitriy Zhilyaev [email protected]
Details
- Commit
- 7aa88e7fdb90
- Parent
- 05ae0c831a41
.github/workflows/goreleaser.ymlmodifiedView file
@@ -1,115 +1,16 @@
11
name: Goreleaser22
33
on:4-
pull_request:5-
branches:6-
- main7-
types:8-
- closed94
push:105
tags: ["v*"]116
127
jobs:13-
tagger:14-
runs-on: ubuntu-latest15-
permissions:16-
contents: write # to create new tag17-
steps:18-
- name: Create tag19-
id: create20-
uses: actions/github-script@v721-
if: github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/')22-
with:23-
github-token: ${{ github.token }}24-
script: |25-
const tag = context.payload.pull_request.head.ref.replace("release/", "v")26-
try {27-
await github.rest.git.deleteRef({28-
owner: context.repo.owner,29-
repo: context.repo.repo,30-
ref: "refs/tags/" + tag,31-
})32-
} catch {33-
}34-
await github.rest.git.createRef({35-
owner: context.repo.owner,36-
repo: context.repo.repo,37-
ref: "refs/tags/" + tag,38-
sha: context.payload.pull_request.merge_commit_sha,39-
})40-
return tag41-
result-encoding: string42-
43-
- name: Get pushed tag44-
id: push45-
if: github.event_name == 'push'46-
run: echo "result=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT47-
48-
- name: combine tags49-
id: combined50-
run: echo "tag=${PUSHED_TAG}${CREATED_TAG}" >> $GITHUB_OUTPUT51-
env:52-
CREATED_TAG: ${{ steps.create.outputs.result }}53-
PUSHED_TAG: ${{ steps.push.outputs.result }}54-
outputs:55-
tag: ${{ steps.combined.outputs.tag }}56-
57-
generate-changelog:58-
runs-on: ubuntu-latest59-
permissions:60-
contents: write # to commit merged changelog61-
pull-requests: write # to create PR62-
needs:63-
- tagger64-
steps:65-
- uses: actions/checkout@v466-
with:67-
fetch-depth: 068-
ref: main69-
70-
- uses: actions/setup-go@v571-
with:72-
go-version-file: go.mod73-
74-
- name: Download changie75-
run: go install github.com/miniscruff/changie@v176-
77-
- name: Generate release changelog78-
run: changie batch $TAG --force79-
env:80-
TAG: ${{ needs.tagger.outputs.tag }}81-
82-
- name: Upload changelog artifact83-
uses: actions/upload-artifact@v484-
with:85-
name: changelog86-
path: .changes/${{ needs.tagger.outputs.tag }}.md87-
88-
- name: Merge changelog89-
run: changie merge90-
91-
- name: Create Pull Request for changelog92-
uses: peter-evans/create-pull-request@v693-
with:94-
add-paths: |95-
CHANGELOG.md96-
.changes97-
commit-message: "chore: update changelog"98-
committer: GitHub <[email protected]>99-
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>100-
branch: "${{ needs.tagger.outputs.tag }}-changelog"101-
delete-branch: true102-
title: "chore: update changelog"103-
1048
goreleaser:1059
runs-on: ubuntu-latest10610
permissions:10711
contents: write # to create release10812
issues: write # to close milestone10913
packages: write # to upload package110-
needs:111-
- tagger112-
- generate-changelog11314
steps:11415
- uses: actions/checkout@v411516
with: