Skip to content

update_humanlogpro_version #120

update_humanlogpro_version

update_humanlogpro_version #120

name: update humanlog-pro version
on:
workflow_dispatch:
inputs:
package_version:
description: 'Version to update to'
required: true
type: string
repository_dispatch:
types: [update_humanlogpro_version]
jobs:
set_humanlog_package_version:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
env:
GOEXPERIMENT: jsonv2
GOPRIVATE: "github.com/humanlogio/humanlog-pro"
GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }}
GH_ACCESS_TOKEN_FOR_AUTO_PR: ${{ secrets.GH_ACCESS_TOKEN_FOR_AUTO_PR }}
PACKAGE_VERSION: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.package_version || github.event.client_payload.package_version }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- run: git config --global --add safe.directory '*'
- run: git config --global url.https://$GH_ACCESS_TOKEN_FOR_HUMANLOGPRO@github.com/.insteadOf https://github.com/
- name: Check outputs
run: echo "will set humanlog-pro@$PACKAGE_VERSION"
- run: ./script/update_humanlogpro_version.sh $PACKAGE_VERSION
- uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GH_ACCESS_TOKEN_FOR_AUTO_PR }}
title: "chore(pro): bump humanlog-pro@${{ github.event_name == 'workflow_dispatch' && github.event.inputs.package_version || github.event.client_payload.package_version }}"
commit-message: "chore(pro): bump humanlog-pro@${{ github.event_name == 'workflow_dispatch' && github.event.inputs.package_version || github.event.client_payload.package_version }}"
branch: "bump-humanlog-pro"