Release #10
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.2.3)" | |
| required: true | |
| type: string | |
| backstage_target: | |
| description: "Version of backstage to target for release (e.g. 1.46.1)" | |
| 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 }} \ | |
| --ref main \ | |
| --debug | |
| - name: Update release.json file | |
| run: | | |
| node utils/update-release-json.js \ | |
| --version ${{ inputs.version }} | |
| - 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 to version ${{ inputs.version }} | |
| commit-message: "chore: auto-release to version ${{ inputs.version }}" | |
| labels: automated, release-${{ inputs.version }} | |
| delete-branch: true | |
| # What to commit | |
| add-paths: | | |
| release.json | |
| plugins/** | |
| Containerfile | |
| .tekton/** |