Skip to content

Commit

Permalink
Grace: update GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Dec 12, 2023
1 parent 26e9a5b commit cfb90ee
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
permissions:
contents: read # to fetch code (actions/checkout)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
java: ['11', '14']
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
permissions:
contents: read # to fetch code (actions/checkout)
checks: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/groovy-joint-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-18.04]
os: [ubuntu-22.04]
java: [11.0.6]
runs-on: ${{ matrix.os }}
steps:
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_dispatch:
jobs:
release_notes:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check if it has release drafter config file
Expand All @@ -27,22 +27,3 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitish: ${{ steps.extract_branch.outputs.value }}
# Otherwise:
- name: Export Gradle Properties
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
uses: micronaut-projects/github-actions/export-gradle-properties@master
- uses: micronaut-projects/github-actions/release-notes@master
if: steps.check_release_drafter.outputs.has_release_drafter == 'false'
id: release_notes
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ncipollo/release-action@v1
if: steps.check_release_drafter.outputs.has_release_drafter == 'false' && steps.release_notes.outputs.generated_changelog == 'true'
with:
allowUpdates: true
commit: ${{ steps.release_notes.outputs.current_branch }}
draft: true
name: ${{ env.title }} ${{ steps.release_notes.outputs.next_version }}
tag: v${{ steps.release_notes.outputs.next_version }}
bodyFile: CHANGELOG.md
token: ${{ secrets.GITHUB_TOKEN }}
39 changes: 27 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
name: Release

on:
release:
types: [published]
permissions: {}
jobs:
release:
permissions:
contents: write # to create release
issues: write # to modify milestones
push:
tags:
- v*

permissions:
contents: write

runs-on: ubuntu-latest
jobs:
create_draft_release:
runs-on: ubuntu-22.04
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Create draft release
run: |
gh release create \
--repo ${{ github.repository }} \
--title ${{ github.ref_name }}
--notes '' \
--draft \
${{ github.ref_name }}
release_and_publish:
needs: create_draft_release
runs-on: ubuntu-22.04
strategy:
matrix:
java: ['11']
Expand Down Expand Up @@ -70,8 +85,8 @@ jobs:
- name: Upload artifacts to the Github release
id: upload_artifact
if: steps.publish.outcome == 'success'
uses: Roang-zero1/github-upload-release-artifacts-action@master
with:
args: build/distributions/grace-${{ steps.release_version.outputs.release_version }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload --clobber "${{ github.ref_name }}" \
build/distributions/grace-${{ steps.release_version.outputs.release_version }}.zip
60 changes: 0 additions & 60 deletions .github/workflows/retry-release.yml

This file was deleted.

0 comments on commit cfb90ee

Please sign in to comment.