From 9511d0052b17f8354c2cfdc0d78331f82ea8f289 Mon Sep 17 00:00:00 2001 From: ymmt Date: Sat, 24 Jul 2021 03:25:36 +0000 Subject: [PATCH] Bump version to 0.1.0 --- .github/workflows/release.yaml | 42 ++++++++++++++++++++++++++++++++++ CHANGELOG.md | 9 ++++---- docs/release.md | 4 ++-- kustomization.yaml | 2 +- version.go | 2 +- 5 files changed, 51 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..d4eb42b --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,42 @@ +name: Release +on: + push: + tags: + - 'v*' +env: + go-version: 1.16 +jobs: + image: + name: Push Container Image + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Build images + run: | + docker build -t accurate:dev . + - name: Login to ghcr.io + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin + - name: Push images + run: | + TAG=${GITHUB_REF#refs/tags/v} + docker tag accurate:dev ghcr.io/cybozu-go/accurate:$TAG + docker push ghcr.io/cybozu-go/accurate:$TAG + release: + name: Release on GitHub + needs: image + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: ${{ env.go-version }} + - run: make release-build + - name: Create Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tagname="${GITHUB_REF#refs/tags/}" + if echo ${{ github.ref }} | grep -q -e '-'; then prerelease=-p; fi + gh release create -t "Release $tagname" $prerelease \ + -n "See [CHANGELOG.md](./CHANGELOG.md) for details." \ + "$tagname" build/* diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd274f..a56217d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] -### Added -### Changed -### Removed +## [0.1.0] -[Unreleased]: https://github.com/cybozu-go/accurate/compare/4b825dc642cb6eb9a060e54bf8d69288fbee4904...HEAD +This is the first public release. + +[Unreleased]: https://github.com/cybozu-go/accurate/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/cybozu-go/accurate/compare/4b825dc642cb6eb9a060e54bf8d69288fbee4904...v0.1.0 diff --git a/docs/release.md b/docs/release.md index 38fa197..6274a36 100644 --- a/docs/release.md +++ b/docs/release.md @@ -34,10 +34,10 @@ It should look like: 2. Make a branch to release ```console - $ git neco dev "$VERSION" + $ git neco dev "bump-$VERSION" ``` -3. Update version strings in `kustomization.yaml` and `version.go`. +3. Update version strings in `kustomization.yaml` and `version.go` in the top directory. 4. Edit `CHANGELOG.md` for the new version ([example][]). 5. Commit the change and push it. diff --git a/kustomization.yaml b/kustomization.yaml index 019e137..6a2e50d 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -10,4 +10,4 @@ configMapGenerator: images: - name: ghcr.io/cybozu-go/accurate - newTag: 0.0.1 + newTag: 0.1.0 diff --git a/version.go b/version.go index 55de996..f8f9071 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package accurate // Version represents the version of accurate. -const Version = "0.0.1" +const Version = "0.1.0"