Skip to content

Commit

Permalink
Merge build and publish jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 16, 2024
1 parent cea7e2c commit 6abb33a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Build'
name: 'Build & Publish'

on: # yamllint disable-line rule:truthy
push:
Expand All @@ -10,15 +10,22 @@ on: # yamllint disable-line rule:truthy
jobs:
build:
uses: metaborg/actions/.github/workflows/gradle-build-matrix.yaml@main
publish:
publish-snapshot:
uses: metaborg/actions/.github/workflows/gradle-publish.yaml@main
with:
gradle-command: |
gradle assemble publish -Pgitonium.isSnapshot=true
gradle assemble publish -Pgitonium.isSnapshot=true
gradle-version-command: |
gradle -q :printVersion -Pgitonium.isSnapshot=true
gradle -q :printVersion -Pgitonium.isSnapshot=true
if: "github.event_name == 'push' && github.ref == 'refs/heads/master'"
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
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 }}
17 changes: 0 additions & 17 deletions .github/workflows/publish.yaml

This file was deleted.

0 comments on commit 6abb33a

Please sign in to comment.