Skip to content

Commit

Permalink
Merge pull request #86 from Skyscanner/release-actions
Browse files Browse the repository at this point in the history
Add actions when cutting a release
  • Loading branch information
maruina authored Jun 9, 2022
2 parents 3efec25 + b4ccb67 commit 1ebc005
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 7 deletions.
15 changes: 11 additions & 4 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
name-template: 'v$RESOLVED_VERSION'
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
labels:
- 'documentation'
- 'fix'
- 'bugfix'
- 'bug'
- title: '💬 Comments & Reviews'
- title: '🧰 Maintenance'
labels:
- 'comment'
- 'chore'
- 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
exclude-contributors:
- 'dependabot'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- main
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions:
contents: read


jobs:
update_release_draft:
permissions:
contents: write # for release-drafter/release-drafter to create a github release
pull-requests: write # for release-drafter/release-drafter to add label to PR
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "main"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: main
32 changes: 29 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Release artifacts

on:
push:
tags:
- "*"
release:
types:
- published

jobs:
release:
Expand All @@ -15,3 +15,29 @@ jobs:
uses: stefanprodan/helm-gh-pages@master
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/skyscanner/kms-issuer
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{raw}}
- name: Login to GitHub Packages
if: github.event_name != 'pull_request'
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and publish a docker image
uses: docker/build-push-action@v3.0.0
with:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 1ebc005

Please sign in to comment.