Skip to content

Auto Update to '17.0.8.1-1' (#7) #8

Auto Update to '17.0.8.1-1' (#7)

Auto Update to '17.0.8.1-1' (#7) #8

Workflow file for this run

name: Publish Module
on:
workflow_dispatch:
push:
tags:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
publish_module:
name: "Publish Module"
runs-on: ubuntu-22.04
steps:
# Checkout repository
- uses: actions/checkout@v4
with:
path: rules/rules_bzlmodrio_jdk
- name: Create Archive
run: git archive HEAD --format=tar.gz --output="rules_bzlmodrio_jdk-${GITHUB_REF_NAME}.tar.gz"
working-directory: rules/rules_bzlmodrio_jdk
- name: Setup archive name
run: echo "ARCHIVE_NAME=rules/rules_bzlmodrio_jdk/rules_bzlmodrio_jdk-${GITHUB_REF_NAME}.tar.gz" >> "$GITHUB_ENV"
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: "${{ env.ARCHIVE_NAME }}"
# Checkout gentool
- uses: actions/checkout@v4
with:
repository: 'bzlmodRio/gentool.git'
fetch-depth: 0
path: gentool
ref: refactor_dev
# Checkout BCR
- uses: actions/checkout@v4
with:
repository: 'bzlmodRio/bazel-central-registry.git'
fetch-depth: 0
path: bazel-central-registry
ref: bzlmodrio
# Run publishing
- run: bazel run //:publish
working-directory: rules/rules_bzlmodrio_jdk/generate
- name: Store version
run: echo "NEW_VERSION=$(bazel run //:get_version)" >> $GITHUB_ENV
working-directory: rules/rules_bzlmodrio_jdk/generate
# Create pull requests
- name: Create Gentool Pull Request
uses: peter-evans/create-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.AUTO_UPDATE_KEY }}
with:
path: gentool
base: refactor_dev
token: ${{ secrets.AUTO_UPDATE_KEY }}
reviewers: pjreiniger
branch: autoupdate/rules_bzlmodrio_jdk_update_${{ env.NEW_VERSION }}
title: "Auto Update rules_bzlmodrio_jdk module to '${{ env.NEW_VERSION }}'"
- name: Create BCR Pull Request
uses: peter-evans/create-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.AUTO_UPDATE_KEY }}
with:
path: bazel-central-registry
base: bzlmodrio
token: ${{ secrets.AUTO_UPDATE_KEY }}
reviewers: pjreiniger
branch: autoupdate/rules_bzlmodrio_jdk_update_${{ env.NEW_VERSION }}
title: "Auto Update latest rules_bzlmodrio_jdk to '${{ env.NEW_VERSION }}'"