Skip to content

Commit

Permalink
Looking good
Browse files Browse the repository at this point in the history
  • Loading branch information
big-andy-coates committed Nov 3, 2022
1 parent 5252ff8 commit 857ac49
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 38 deletions.
3 changes: 3 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ changelog:
- title: Bug Fixes 🎉
labels: [ bug ]

- title: Dependency Updates
labels: [ dependencies ]

- title: Less Exciting Things
labels: [ "*" ]
17 changes: 4 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,15 @@ name: Build

on:
push:
branches: [ not-main ] # todo:
# tags:
# - v*
# - v*.*.*
# todo - !*-alpha
branches: [ main ]
tags: [ "v*.*.*" ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
publish_artifacts:
description: "Publish release artifacts: true or false?"
default: "true"
schedule:
- cron: '0 0 * * 0'

jobs:
build-code:
Expand Down Expand Up @@ -48,18 +43,14 @@ jobs:
git fetch --tags --unshallow
./gradlew publish closeSonatypeStagingRepository
# Todo:
build-release:
# if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, '-alpha')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/[email protected]
- name: Hack
run: |
echo "github.ref: ${{ github.ref }}"
- name: Release
- name: Create GitHut Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CodeQL

on:
push:
branches: [ not-main ] # todo:
pull_request:
branches: [ main ]

Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/release-notes.yml

This file was deleted.

10 changes: 8 additions & 2 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# A Workflow for adjusting the version number of the next release

name: Version
name: Set next version

on:
workflow_dispatch:
inputs:
part:
description: "Part to increment: Major, Minor or Patch"
description: "Part to increment: Major, Minor, Patch or the next release, e.g. 1.2.3"
required: true
default: Minor

Expand All @@ -29,7 +29,13 @@ jobs:
- name: Fetch all tags
run: git fetch --tags --unshallow
- name: Increment version
if: contains(fromJson('["Major", "Minor", "Patch"]'), github.event.inputs.part)
run: |
# The following command will trigger the build.yml workflow as it pushes a alpha tag
./gradlew markNextVersion -Prelease.incrementer=increment${{ github.event.inputs.part }}
- name: Set next version
if: !contains(fromJson('["Major", "Minor", "Patch"]'), github.event.inputs.part)
run: |
# The following command will trigger the build.yml workflow as it pushes a alpha tag
./gradlew markNextVersion -Prelease.version=${{ github.event.inputs.part }}

0 comments on commit 857ac49

Please sign in to comment.