Skip to content

Merge pull request #34 from VirtusLab/on-push #12

Merge pull request #34 from VirtusLab/on-push

Merge pull request #34 from VirtusLab/on-push #12

Workflow file for this run

name: Publish jar
on:
push:
tags: ["**"]
jobs:
tests:
uses: ./.github/workflows/ci.yaml
publish:
runs-on: ubuntu-latest
needs: [tests]
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: bazelbuild/setup-bazelisk@v3
with:
bazelisk-cache: true
repository-cache: true
- name: Mount bazel cache
uses: actions/cache@v4
with:
path: |
~/.cache/bazel
key: ubuntu-latest-bazel-ci-cache
- name: Show version to be published
run: |
echo "Git tag: $(git describe --tags --exact-match HEAD 2>/dev/null || echo 'No exact tag found')"
bazel query @bazel_bsp_versions//:versions.bzl --output=build 2>/dev/null || true
cat $(bazel info output_base)/external/bazel_bsp_versions/versions.bzl 2>/dev/null || echo "Could not read versions.bzl"
- name: Publish package
run: |
bazel run \
//server/install:publish \
--action_env=SONATYPE_USERNAME \
--action_env=SONATYPE_PASSWORD \
--action_env=SONATYPE_SIGNING_KEY \
--action_env=SONATYPE_SIGNING_KEY_PASSWORD
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_SIGNING_KEY: ${{ secrets.PGP_SECRET }}
SONATYPE_SIGNING_KEY_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}