Release #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "Version to set in release.json (e.g. 1.9)" | |
| required: true | |
| type: string | |
| backstage_target: | |
| description: "General version of Backstage you want to bump to (e.g. 1.45). Only use (MAJOR.MINOR) values." | |
| required: true | |
| type: string | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| - name: Install dependencies | |
| run: yarn | |
| - name: bump plugins | |
| run: | | |
| node utils/bump-plugins.js \ | |
| --target ${{ inputs.backstage_target }} \ | |
| --debug | |
| - name: Install plugin updates | |
| run: yarn install --mode=update-lockfile | |
| - name: Update release.json file | |
| run: | | |
| node utils/update-package-json.js \ | |
| --version ${{ inputs.version }} \ | |
| --target ${{ inputs.backstage_target }} | |
| - name: Update Containerfile | |
| run: | | |
| node utils/update-container-release-version.js \ | |
| --version ${{ inputs.version }} | |
| - name: Update .tekton files | |
| run: | | |
| node utils/update-tkn-release-version.js \ | |
| --version ${{ inputs.version }} | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| # Github bot: https://api.github.com/users/github-actions%5Bbot%5D | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| base: main | |
| branch: release-${{ inputs.version }} | |
| title: "chore: auto-release to version ${{ inputs.version }}" | |
| body: | | |
| This PR was automatically generated by a GitHub Actions workflow. | |
| Auto release tssc-backstage-plugin artifacts to version ${{ inputs.version }}. | |
| These updates target Backstage version ${{ inputs.backstage_target }}. | |
| commit-message: "chore: auto-release to version ${{ inputs.version }}" | |
| labels: automated, release, tssc-${{ inputs.version }}, backstage-${{ inputs.backstage_target }} | |
| delete-branch: true | |
| # What to commit | |
| add-paths: | | |
| package.json | |
| plugins/** | |
| Containerfile | |
| .tekton/** | |
| yarn.lock |