Skip to content

Commit

Permalink
Combine build and publish workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 16, 2024
1 parent ba0a38b commit 9cce246
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
---
name: 'Build'
name: 'Build & Publish'

on: # yamllint disable-line rule:truthy
push:
branches:
- main
tags:
- "release-*.*.*"
pull_request:
branches:
- main

jobs:
build:
uses: metaborg/actions/.github/workflows/gradle-build-matrix.yaml@main
publish-snapshot:
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main
with:
gradle-command: |
gradle build
gradle assemble publish -Pgitonium.isSnapshot=true
gradle-version-command: |
gradle -q :convention-plugin:printVersion -Pgitonium.isSnapshot=true
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'"
needs: [build]
secrets:
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }}
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }}
publish-release:
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main
with:
gradle-version-command: |
gradle -q :convention-plugin:printVersion
if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags/release-')"
needs: [build]
secrets:
METABORG_ARTIFACTS_USERNAME: ${{ secrets.METABORG_ARTIFACTS_USERNAME }}
METABORG_ARTIFACTS_PASSWORD: ${{ secrets.METABORG_ARTIFACTS_PASSWORD }}

22 changes: 0 additions & 22 deletions .github/workflows/publish.yaml

This file was deleted.

0 comments on commit 9cce246

Please sign in to comment.