Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for release #17

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: GoRelease

on:
push:
tags:
- 'v*.*.*'

env:
GO_VERSION: '1.16'
TAG: ${{ github.ref_name }}
RELEASE_VERSION: ${{ github.ref_name }}
defaults:
run:
working-directory: go/src/open-cluster-management.io/config-policy-controller

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v2
with:
fetch-depth: 1
path: go/src/open-cluster-management.io/config-policy-controller
- name: install Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: build images
run: |
make build-images
- name: push image
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login quay.io --username ${{ secrets.DOCKER_USER }} --password-stdin
docker push quay.io/open-cluster-management/config-policy-controller:$RELEASE_VERSION
- name: generate changelog
run: |
echo "# config-policy-controller $RELEASE_VERSION" > /home/runner/work/changelog.txt
echo "- See the [CHANGELOG](https://github.com/open-cluster-management-io/config-policy-controller/blob/main/CHANGELOG/CHANGELOG-${RELEASE_VERSION}.md) for more details." >> /home/runner/work/changelog.txt
echo "- The released image is quay.io/open-cluster-management/config-policy-controller:$RELEASE_VERSION" >> /home/runner/work/changelog.txt
- name: publish release
uses: softprops/action-gh-release@v0.1.5
env:
GITHUB_TOKEN: ${{ github.token }}
with:
body_path: /home/runner/work/changelog.txt
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-v0.5.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Initial release