diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml deleted file mode 100644 index 40777eec4..000000000 --- a/.github/workflows/pre-release.yml +++ /dev/null @@ -1,79 +0,0 @@ -# .github/workflows/pre-release.yaml -name: Pre Release Workflow - -on: - push: - tags: - # only run release on v7.0.0 and up - - v[7-9]\.[0-9]+\.[0-9]+ - - v[1-9][0-9]+\.[0-9]+\.[0-9]+ - -permissions: - contents: write - actions: write - -jobs: - pre-release: - runs-on: ubuntu-latest - outputs: - tag: ${{ steps.extract_tag.outputs.tag }} - steps: - - - name: Set Branch - id: set_branch - run: | - echo "branch=${GITHUB_REF_NAME%.*}.x" >> $GITHUB_OUTPUT - - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: ${{ steps.set_branch.outputs.branch }} - - - uses: actions/setup-node@v4 - with: - node-version: 20 - - - name: Update npm version - run: | - cd web_ui/frontend - - # Get the current tag and set the package.json version to it - npm version ${GITHUB_REF_NAME:1} - - # Add some verbosity - echo "NPM version is now $(npm version)" - - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: "Pre Release: Update npm version" - branch: ${{ steps.set_branch.outputs.branch }} - - - name: Reset the tag to the newest commit - run: | - - # Delete the previous tag - git tag --delete ${GITHUB_REF_NAME} - git push origin :refs/tags/${GITHUB_REF_NAME} - - # Create and push the new tag - git tag ${GITHUB_REF_NAME} - git push origin --tags - - - name: Extract tag name - id: extract_tag - if: startsWith(github.ref, 'refs/tags/') - run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}" - - release-container: - needs: [pre-release] - uses: ./.github/workflows/build-prod-container.yml - secrets: inherit - with: - tag: ${{ needs.pre-release.outputs.tag }} - release_workflow: true - - release: - needs: [pre-release] - uses: ./.github/workflows/release.yml - secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7789e70da..95e8b09aa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,11 @@ name: goreleaser on: - workflow_call: + push: + tags: + # only run release on v7.0.0 and up + - v[7-9]\.[0-9]+\.[0-9]+ + - v[1-9][0-9]+\.[0-9]+\.[0-9]+ permissions: contents: write