Skip to content

Commit

Permalink
Combine build and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Virtlink committed Jul 16, 2024
1 parent 7537a35 commit 8762ca0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
20 changes: 18 additions & 2 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 @@ -11,6 +11,22 @@ on: # yamllint disable-line rule:truthy
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 :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 }}
22 changes: 0 additions & 22 deletions .github/workflows/publish.yaml

This file was deleted.

0 comments on commit 8762ca0

Please sign in to comment.