Skip to content

Commit

Permalink
Add a release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Nov 19, 2024
1 parent 5260eaa commit a359313
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/actions/create-github-release/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create GitHub Release
description: 'Create the release on GitHub with a changelog'
inputs:
milestone:
description: 'Name of the GitHub milestone for which a release will be created'
required: true
pre-release:
description: 'Whether the release is a pre-release (a milestone or release candidate)'
required: false
default: 'false'
token:
description: 'Token to use for authentication with GitHub'
required: true
runs:
using: composite
steps:
- name: Generate Changelog
uses: spring-io/github-changelog-generator@185319ad7eaa75b0e8e72e4b6db19c8b2cb8c4c1 #v0.0.11
with:
config-file: '.github/actions/create-github-release/changelog-generator.yml'
milestone: ${{ inputs.milestone }}
token: ${{ inputs.token }}
- name: Create GitHub Release
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md ${{ inputs.pre-release == 'true' && '--prerelease' || '' }}
14 changes: 14 additions & 0 deletions .github/actions/create-github-release/changelog-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
changelog:
sections:
- title: ":star: New Features"
labels:
- "type: enhancement"
- title: ":lady_beetle: Bug Fixes"
labels:
- "type: bug"
- "type: regression"
- title: ":notebook_with_decorative_cover: Documentation"
labels:
- "type: documentation"
issues:
generate_links: true
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Release
on:
push:
tags:
- v0.0.[0-9]+
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build:
name: 'Build'
runs-on: 'ubuntu-latest'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build
uses: ./.github/actions/build
integration-test:
name: 'Integration test'
runs-on: ubuntu-latest
services:
artifactory:
image: docker.bintray.io/jfrog/artifactory-oss:7.12.10
ports:
- 8081:8081
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Integration test
uses: ./.github/actions/integration-test
with:
signing-key: ${{ secrets.INTEGRATION_TEST_SIGNING_KEY }}
signing-passphrase: ${{ secrets.INTEGRATION_TEST_SIGNING_PASSPHRASE }}
create-github-release:
name: Create GitHub Release
needs:
- build
- integration-test
runs-on: 'ubuntu-latest'
steps:
- name: Check Out Code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Create GitHub Release
uses: ./.github/actions/create-github-release
with:
milestone: ${{ needs.build.outputs.version }}
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}

0 comments on commit a359313

Please sign in to comment.