From e4a28a19a923c52816a1e7ba40a545198f65bf15 Mon Sep 17 00:00:00 2001 From: Sebastian Barth Date: Mon, 14 Oct 2024 09:32:09 +0200 Subject: [PATCH] Slb/sba/tent 5945 remove obsolete legacy workflow (#52) * TENT-5945 feat: Remove unnecessary legacy workflow as older branches will use their version of the same script with same name * TENT-5945 refactor: Improve Release workflow description --- .github/workflows/release-legacy.yml | 97 ---------------------------- .github/workflows/release.yml | 5 +- 2 files changed, 1 insertion(+), 101 deletions(-) delete mode 100644 .github/workflows/release-legacy.yml diff --git a/.github/workflows/release-legacy.yml b/.github/workflows/release-legacy.yml deleted file mode 100644 index 4c895784..00000000 --- a/.github/workflows/release-legacy.yml +++ /dev/null @@ -1,97 +0,0 @@ -# This workflow should only be used for Semantic versioning based releases of Cadenza JS versions used in Cadenza 10.1 -# and earlier. Starting with 10.2 we do not use Semantic versioning in the classic way. - -name: Legacy Release (Cadenza 10.1 and earlier) - -on: - workflow_dispatch: - inputs: - release-type: - type: choice - description: 'Release type' - required: true - options: - - patch - - minor - - major - default: 'patch' - - -jobs: - release: - runs-on: ubuntu-latest - - steps: - - uses: actions/create-github-app-token@v1 - id: app-token - with: - app-id: ${{ vars.DISY_RELEASE_APP_ID }} - private-key: ${{ secrets.DISY_RELEASE_APP_SECRET }} - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ steps.app-token.outputs.token }} - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: 'npm' - - - run: npm ci - - run: npm test - - run: npm run build - - # Needed for creating the tag - - name: Configure Git - run: | - git config --global user.email "github-actions[bot]@users.noreply.github.com" - git config --global user.name "github-actions[bot]" - - - name: Bump package version - run: | - echo "NEW_VERSION=$(npm --no-git-tag-version version ${{ github.event.inputs.release-type }})" >> $GITHUB_ENV - echo "RELEASE_TAG=latest" >> $GITHUB_ENV - - # Update changelog unreleased section with new version - - name: Update changelog - uses: superfaceai/release-changelog-action@v2 - with: - path-to-changelog: CHANGELOG.md - version: ${{ env.NEW_VERSION }} - operation: release - - - name: Commit and tag changes - run: | - git add "package.json" - git add "CHANGELOG.md" - git commit -m "chore: release ${{ env.NEW_VERSION }}" - git tag ${{ env.NEW_VERSION }} - - - name: Push changes - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: git push origin && git push --tags - - - id: get-changelog - name: Get version changelog - uses: superfaceai/release-changelog-action@v2 - with: - path-to-changelog: CHANGELOG.md - version: ${{ env.NEW_VERSION }} - operation: read - - - name: Update GitHub release documentation - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ env.NEW_VERSION }} - body: ${{ steps.get-changelog.outputs.changelog }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Publish npm package - run: | - npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" - npm publish --verbose --access=public --tag=${{ env.RELEASE_TAG }} - env: - NPM_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5000b376..21cf9d81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,6 +1,3 @@ -# This workflow should only be used for version releases for Cadenza JS versions bundled with -# Cadenza 10.2 and later. For earlier versions use the "Legacy Release" workflow. - name: Release on: @@ -10,7 +7,7 @@ on: type: string description: | Cadenza Main Version - (Required only to create a new .0 release (e.g. 10.2.0). Otherwise the current version is incremented.)' + (e.g. '10.2'; Required only to create a new *.0 release, e.g. 10.2.0 for Cadenza 10.2. Otherwise the current version is incremented) jobs: