scrow-commands/.forgejo/workflows/publish.yml
kento2 fb2f1f1859
All checks were successful
/ test (push) Successful in 35s
/ deploy (push) Successful in 38s
fix publishing
2026-08-25 19:00:17 +02:00

57 lines
1.8 KiB
YAML

on:
push:
jobs:
test:
runs-on: docker
container:
image: "git.lab0x13.site/scrow/bazel-java:0.12"
steps:
- uses: actions/checkout@v7
- uses: actions/cache@v6
with:
path: /var/cache/bazel
key: bazel-${{ env.FORGEJO_REPOSITORY }}
- id: run-tests
env:
CACHE_USERNAME: ${{ secrets.CACHE_USERNAME }}
CACHE_PASSWORD: ${{ secrets.CACHE_PASSWORD }}
run: |
bazel \
--output_user_root=/var/cache/bazel \
test \
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
--noremote_upload_local_results \
--noremote_cache_async \
--test_output=all \
//...
deploy:
needs: test
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
runs-on: docker
container:
image: "git.lab0x13.site/scrow/bazel-java:0.12"
steps:
- uses: actions/checkout@v7
- uses: actions/cache@v6
with:
path: /var/cache/bazel
key: bazel-${{ env.FORGEJO_REPOSITORY }}
- id: deploy
env:
CACHE_USERNAME: ${{ secrets.CACHE_USERNAME }}
CACHE_PASSWORD: ${{ secrets.CACHE_PASSWORD }}
MAVEN_USER: ${{ secrets.MAVENREPO_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVENREPO_PASSWORD }}
run: |
for target in //bukkit:bukkit.publish //common:common.publish
do
bazel \
--output_user_root=/var/cache/bazel \
run "$target" \
--remote_cache="https://${CACHE_USERNAME}:${CACHE_PASSWORD}@cache.lab0x13.site:443" \
--remote_upload_local_results \
--noremote_cache_async
done