-
Notifications
You must be signed in to change notification settings - Fork 1.2k
75 lines (75 loc) · 3.03 KB
/
release.yaml
File metadata and controls
75 lines (75 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
on:
push:
# Only release on supported semantic version tagging e.g. v0.0.1-rc.0
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+'
jobs:
release:
permissions:
id-token: write # aws-actions/configure-aws-credentials@v4.0.1
contents: write # marvinpinto/action-automatic-releases@v1.2.1
pull-requests: write # name: Create PR
if: github.repository == 'aws/karpenter-provider-aws'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Create GitHub Release
uses: marvinpinto/action-automatic-releases@919008cf3f741b179569b7a6fb4d8860689ab7f0 # v1.2.1
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
prerelease: false
- uses: ./.github/actions/install-deps
with:
use-cache: false
- uses: ./.github/actions/e2e/install-helm
with:
version: v3.18.6
- uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
with:
role-to-assume: 'arn:aws:iam::${{ vars.RELEASE_ACCOUNT_ID }}:role/${{ vars.RELEASE_ROLE_NAME }}'
aws-region: ${{ vars.RELEASE_REGION }}
- run: make release
env:
RELEASE_ACCOUNT_ID: ${{ vars.RELEASE_ACCOUNT_ID }}
CACHED_ECR_NAME: ${{ vars.CACHED_ECR_NAME }}
- uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5.1.1
with:
role-to-assume: 'arn:aws:iam::${{ vars.READONLY_ACCOUNT_ID }}:role/${{ vars.READONLY_ROLE_NAME }}'
aws-region: ${{ vars.READONLY_REGION }}
- run: make docgen
- run: make prepare-website
- run: make stable-release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPO: ${{ github.repository }}
- name: Create PR
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const { repo, owner } = context.repo;
const tag = context.ref.replace("refs/tags/", '');
const result = await github.rest.pulls.create({
title: `chore: Release ${tag}`,
owner,
repo,
head: `release-${tag}`,
base: 'main',
body: [
`Stable Release Changes for ${tag}.`,
'Please disregard this PR if it is for a patch release.',
'Please remove the branch after merging.',
'This PR is generated by [StableRelease](https://github.com/aws/karpenter-provider-aws/actions/workflows/stable-release.yml).'
].join('\n')
});
github.rest.issues.addLabels({
owner,
repo,
issue_number: result.data.number,
labels: ['stable-release','website','helm-charts']
});