Release workflow fix (#11733)

* Release workflow fix

* Remove obsolete script

* Small fix
This commit is contained in:
Michal Kinas
2026-03-11 15:37:58 +01:00
committed by GitHub
parent f44e4e90e8
commit 2e668fc7b2
3 changed files with 4 additions and 82 deletions
-58
View File
@@ -1,58 +0,0 @@
name: "git-tag"
on:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
push:
branches:
- master
- master-patch-*
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
GH_COMMIT: ${{ github.sha }}
GH_BUILD_NUMBER: ${{ github.run_id }}
LOG_LEVEL: "ERROR"
NODE_OPTIONS: "--max-old-space-size=5120"
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
jobs:
release:
uses: ./.github/workflows/release.yml
secrets: inherit
with:
dry-run-flag: false
setup:
needs: release
timeout-minutes: 20
name: "Release tag"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: $BOT_GITHUB_TOKEN
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- name: install NPM
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: "Release tag"
env:
DRYRUN_FLAG: ${{ steps.set-dryrun.outputs.dryrun }}
run: |
git fetch --all --quiet
BRANCH=${GITHUB_REF##*/} ./scripts/github/release/git-tag.sh $DRYRUN_FLAG
+4 -2
View File
@@ -19,9 +19,11 @@ on:
types: [closed] types: [closed]
branches: branches:
- develop - develop
- master
- develop-patch* - develop-patch*
- master-patch* push:
branches:
- master
- master-patch-*
permissions: permissions:
id-token: write # Required for OIDC id-token: write # Required for OIDC
-22
View File
@@ -1,22 +0,0 @@
#!/bin/bash
if [[ $BRANCH == "master" ]]; then
VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
else
VERSION=$(npm view @alfresco/adf-core@beta version)
fi;
echo "git tag -a ${VERSION} -m ${VERSION}"
git config --local user.name "alfresco-build"
git config --local user.email "build@alfresco.com"
git tag -a ${VERSION} -m "${VERSION} [ci skip] "
git remote rm origin
GITHUB_REPO=https://$GITHUB_TOKEN:x-oauth-basic@github.com/Alfresco/alfresco-ng2-components.git
git remote add origin $GITHUB_REPO
if [[ "$1" == "--dryrun" ]]; then
echo "dry run: Pushing new tag ${VERSION}!"
else
echo "Pushing new tag ${VERSION}!"
git push origin --tags
fi;