Skip to content
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
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
tags:
- "v2.*"

permissions:
contents: write # require for uploading releases

env:
DEFAULT_GO_VERSION: ^1.18
GITHUB_USERNAME: ${{ secrets.EC2_BOT_GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.EC2_BOT_GITHUB_TOKEN }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}

jobs:
release:
name: release
runs-on: ubuntu-20.04
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slight preference for using ubuntu-22.04 since it will be supported longer than 20.04. But I can also see an argument for keeping it the same as our other projects/branches.

steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ env.DEFAULT_GO_VERSION }}

- name: Check out code
uses: actions/checkout@v2

- name: Release assets
run: make release
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}

- name: Create eks-charts PR
run: make ekscharts-sync-release

- name: Sync README to ECR Public
run: make sync-readme-to-ecr-public
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ secrets.AWS_SESSION_TOKEN }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ latest-release-tag: ## Get tag of most recent release.
previous-release-tag: ## Get tag of second most recent release.
@git describe --tags --abbrev=0 `git rev-parse --abbrev-ref HEAD`^

.PHONY: release
release: build-and-push-images upload-resources-to-github ## Build and push images to ECR Public and upload resources to GitHub.

.PHONY: repo-full-name
repo-full-name: ## Get the full name of the GitHub repository for Node Termination Handler.
@echo "$(GITHUB_REPO_FULL_NAME)"
Expand Down