Skip to content

Commit

Permalink
ci: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stempler committed May 22, 2024
1 parent dbeb696 commit 45cd13a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Release

on:
workflow_dispatch:
inputs:
dryRun:
type: boolean
description: "Dry-Run"
default: false

concurrency:
# only run one publishing at a time to avoid conflicts
group: publish-${{ github.ref }}

jobs:
release:
uses: wetransform/gha-workflows/.github/workflows/gradle-library-publish.yml@feat/release-outputs # TODO merge related branch and replace with release version once tested
with:
java-version: 17
build-tasks: clean check distZip buildDeb
publish-tasks: publish
multi-module: false
semantic-release: true
semantic-release-dryrun: ${{ inputs.dryRun }}
secrets:
SLACK_NOTIFICATIONS_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
WETF_ARTIFACTORY_USER: ${{ secrets.WETF_ARTIFACTORY_USER }}
WETF_ARTIFACTORY_PASSWORD: ${{ secrets.WETF_ARTIFACTORY_PASSWORD }}
WE_RELEASE_GITHUB_APP_ID: ${{ secrets.WE_RELEASE_GITHUB_APP_ID }}
WE_RELEASE_GITHUB_PRIVATE_KEY: ${{ secrets.WE_RELEASE_GITHUB_PRIVATE_KEY }}

docker:
needs: [release]
if: ${{ needs.release.outputs.release-published != 'false' && needs.release.outputs.release-published != '' }}
uses: wetransform/gha-workflows/.github/workflows/gradle-service-publish.yml@feat/release-outputs # TODO merge related branch and replace with release version once tested
with:
checkout-ref: refs/tags/v${{needs.release.outputs.release-version}} # check out release tag
java-version: 17
image-tag: wetransform/hale-cli:latest # image to scan
# don't run tests since this is already done in artifacts
gradle-tasks: clean dockerPushImage
expect-tests: false
secrets:
DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
SLACK_NOTIFICATIONS_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
18 changes: 18 additions & 0 deletions .releaserc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
branches: master

plugins:
- - "@semantic-release/commit-analyzer"
- preset: conventionalcommits
- - "@semantic-release/release-notes-generator"
- preset: conventionalcommits
- "@semantic-release/changelog"
- - "@semantic-release/exec"
- verifyReleaseCmd: ./gradlew verifyNoSnapshotDependencies
publishCmd: RELEASE=true ./gradlew showVersion verifyReleaseVersion $PUBLISH_TASKS
- - "@semantic-release/git"
- assets:
- CHANGELOG.md
- - "@semantic-release/github"
- assets:
- build/distributions/*
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# Change Log

All notable changes to this project will be documented in this file.
See the [change log guidelines](http://keepachangelog.com/) for information on how to structure the file.

## [5.1.0]

### Added
Expand Down

0 comments on commit 45cd13a

Please sign in to comment.