Skip to content

chore: bump v0.17.0 (#472) #61

chore: bump v0.17.0 (#472)

chore: bump v0.17.0 (#472) #61

Workflow file for this run

name: release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get version from tag
id: tag_name
run: |
version=${GITHUB_REF#refs/tags/v}
set +e
if ! grep "$version" CHANGELOG.md > /dev/null; then
echo "Didn't find '$version'; defaulting to 'Unreleased'."
version="Unreleased"
fi
set -e
echo ::set-output name=current_version::$version
- name: Get Changelog Entry
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
path: ./CHANGELOG.md
version: ${{ steps.tag_name.outputs.current_version }}
- name: Write release notes to file
run: |
mkdir ./tmp
echo "Our version is '${{ steps.tag_name.outputs.current_version }}'"
echo "${{steps.changelog_reader.outputs.changes}}" > ./tmp/release_notes.md
echo "Our release notes:"
cat ./tmp/release_notes.md
- name: Archive code examples
run: |
export TMPDIR=$(pwd)/tmp
cd examples
bash ./build_examples.sh
git checkout ./app-cdk-typescript/package-lock.json
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17.1
- name: cache
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --debug --rm-dist --release-notes ./tmp/release_notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}