mirror of
https://github.com/ONLYOFFICE/build_tools.git
synced 2026-02-10 20:45:38 +08:00
31 lines
854 B
YAML
31 lines
854 B
YAML
name: Update hard-coded version
|
|
|
|
on: workflow_dispatch
|
|
|
|
jobs:
|
|
update-version:
|
|
if: >-
|
|
${{ contains(github.ref, 'refs/heads/hotfix/v') ||
|
|
contains(github.ref, 'refs/heads/release/v') }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.PUSH_TOKEN }}
|
|
|
|
- name: Set version
|
|
run: >-
|
|
echo "${{ github.ref_name }}" |
|
|
awk '{gsub(/.+\/v/,"version=");print;}' >> $GITHUB_ENV
|
|
|
|
- name: Save version
|
|
run: echo "${{ env.version }}" > version
|
|
|
|
- name: Commit & push changes
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
author_name: github-actions[bot]
|
|
author_email: github-actions[bot]@users.noreply.github.com
|
|
message: Update hard-coded version to ${{ env.version }}
|
|
add: version
|