diff --git a/.github/workflows/git-tag.yml b/.github/workflows/git-tag.yml deleted file mode 100644 index d33860df22..0000000000 --- a/.github/workflows/git-tag.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d7b5c34df7..6aaf968f71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,9 +19,11 @@ on: types: [closed] branches: - develop - - master - develop-patch* - - master-patch* + push: + branches: + - master + - master-patch-* permissions: id-token: write # Required for OIDC diff --git a/scripts/github/release/git-tag.sh b/scripts/github/release/git-tag.sh deleted file mode 100755 index fe474097d7..0000000000 --- a/scripts/github/release/git-tag.sh +++ /dev/null @@ -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;