Skip to content

Commit

Permalink
Hidden goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
Slonimskaia committed Feb 21, 2023
1 parent 2d9e0e7 commit b95bcd2
Showing 1 changed file with 45 additions and 45 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,48 @@
# You will need to pass the `--batch` flag to `gpg` in your signing step
# in `goreleaser` to indicate this is being used in a non-interactive mode.
#
name: goreleaser
on:
push:
tags:
- 'v*'
jobs:
goreleaser:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
- name: Get changelog
run: |
echo 'CHANGELOG_BODY<<EOF' >> $GITHUB_ENV
awk '/## ([0-9]+\.?)+/{n++}; n==1; n==2{exit}' CHANGELOG.md >> $GITHUB_ENV
echo 'EOF'>> $GITHUB_ENV
- name: Publish Release Notes
uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ github.ref_name }}
name: "${{ github.ref_name }}"
footer: "${{ env.CHANGELOG_BODY }}"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#name: goreleaser
#on:
# push:
# tags:
# - 'v*'
#jobs:
# goreleaser:
# permissions: write-all
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.18
# - name: Import GPG key
# id: import_gpg
# uses: crazy-max/ghaction-import-gpg@v5
# with:
# gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
# passphrase: ${{ secrets.PASSPHRASE }}
# - name: Get changelog
# run: |
# echo 'CHANGELOG_BODY<<EOF' >> $GITHUB_ENV
# awk '/## ([0-9]+\.?)+/{n++}; n==1; n==2{exit}' CHANGELOG.md >> $GITHUB_ENV
# echo 'EOF'>> $GITHUB_ENV
# - name: Publish Release Notes
# uses: release-drafter/release-drafter@v5
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag: ${{ github.ref_name }}
# name: "${{ github.ref_name }}"
# footer: "${{ env.CHANGELOG_BODY }}"
# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v2
# with:
# version: latest
# args: release --rm-dist
# env:
# GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit b95bcd2

Please sign in to comment.