mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
Release workflow fix (#11733)
* Release workflow fix * Remove obsolete script * Small fix
This commit is contained in:
@@ -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
|
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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;
|
|
||||||
Reference in New Issue
Block a user