Skip to content

Commit

Permalink
improve release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
  • Loading branch information
sebhoss committed Jan 17, 2024
1 parent c18f5bf commit d54ce58
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ updates:
assignees:
- sebhoss
labels:
- Build :: GitHub
- Priority :: Low
- Type :: Task
- "Build :: GitHub"
- "Priority :: Low"
- "Type :: Task"
4 changes: 4 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changelog:
exclude:
labels:
- "Release :: Ignore"
32 changes: 28 additions & 4 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Run Benchmarks
on:
workflow_run:
workflows: [Automated Release]
types:
- completed
release:
types: [released]
env:
JAVA_VERSION: 17
JAVA_PACKAGE: jdk
Expand Down Expand Up @@ -53,3 +51,29 @@ jobs:
with:
commit_message: Update benchmark data for ${{ steps.last_release.outputs.tag }}
file_pattern: yosql-website/*.json
- id: cpr
name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.PAT }}
commit-message: Update benchmarks for latest release
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: Update benchmarks for latest release
body: ${{ steps.gwu.outputs.version-information }}
labels: |
Release :: Ignore
Benchmarks :: CodeGen
Benchmarks :: DAO
Priority :: Low
Type :: Task
assignees: sebhoss
draft: false
base: main
branch: update-benchmarks
delete-branch: true
- name: Enable Pull Request Automerge
if: steps.cpr.outputs.pull-request-operation == 'created'
run: gh pr merge --rebase --auto "${{ steps.cpr.outputs.pull-request-number }}"
with:
token: ${{ secrets.PAT }}
6 changes: 2 additions & 4 deletions .github/workflows/release-announcement.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Announce Release
on:
workflow_run:
workflows: [Automated Release]
types:
- completed
release:
types: [released]
jobs:
announce:
name: Send Announcements
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: commits
name: Count Commits
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD)" >> $GITHUB_OUTPUT
run: echo "count=$(git rev-list --count ${{ steps.last_release.outputs.tag }}..HEAD) -- pom.xml yosql-codegen yosql-internals yosql-models yosql-tooling" >> $GITHUB_OUTPUT
- id: release
name: Create Release Version
if: steps.commits.outputs.count > 0
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- id: upload-ant-tooling
name: Upload Ant Tooling Artifact
if: needs.prepare.outputs.commit_count > 0
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-ant
path: ./yosql-tooling/yosql-tooling-ant/target/yosql-tooling-ant-*-dist*
Expand Down Expand Up @@ -195,28 +195,28 @@ jobs:
- id: upload-jvm-cli-tooling
name: Upload JVM CLI Tooling
if: needs.prepare.outputs.commit_count > 0 && runner.os == 'Linux'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-cli-jvm
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-jvm*
- id: upload-linux-cli-tooling
name: Upload Linux CLI Tooling
if: needs.prepare.outputs.commit_count > 0 && runner.os == 'Linux'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-cli-linux
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-linux*
- id: upload-mac-cli-tooling
name: Upload Mac OSX CLI Tooling
if: needs.prepare.outputs.commit_count > 0 && runner.os == 'macOS'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-cli-mac
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-mac*
- id: upload-windows-cli-tooling
name: Upload Windows CLI Tooling
if: needs.prepare.outputs.commit_count > 0 && runner.os == 'Windows'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-cli-windows
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-windows*
Expand All @@ -236,7 +236,7 @@ jobs:
- id: download
name: Download Artifacts
if: needs.prepare.outputs.commit_count > 0
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
- id: create_release
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ jobs:
run: mvn --batch-mode --projects yosql-examples/yosql-examples-ant --also-make --also-make-dependents verify
- id: upload-ant-tooling
name: Upload Ant Tooling
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: yosql-tooling-ant
name: yosql-tooling-ant-${{ matrix.os }}
path: ./yosql-tooling/yosql-tooling-ant/target/yosql-tooling-ant-*-dist*
cli:
name: Build CLI Tooling on ${{ matrix.os }}
Expand Down Expand Up @@ -121,28 +121,28 @@ jobs:
run: mvn --batch-mode --projects yosql-examples/yosql-examples-cli --also-make --also-make-dependents verify
- id: upload-jvm-cli-tooling
name: Upload JVM CLI Tooling
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: yosql-tooling-cli-jvm
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-jvm*
- id: upload-linux-cli-tooling
name: Upload Linux CLI Tooling
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'Linux'
with:
name: yosql-tooling-cli-linux
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-linux*
- id: upload-mac-cli-tooling
name: Upload Mac OSX CLI Tooling
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'macOS'
with:
name: yosql-tooling-cli-mac
path: ./yosql-tooling/yosql-tooling-cli/target/yosql-tooling-cli-*-mac*
- id: upload-windows-cli-tooling
name: Upload Windows CLI Tooling
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: yosql-tooling-cli-windows
Expand Down

0 comments on commit d54ce58

Please sign in to comment.