|
| 1 | +name: release-please |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +jobs: |
| 9 | + release-please: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + # TODO: googleapis/release-please-action cannot sign commits yet. |
| 13 | + # We'll use the cli until there's a fix for |
| 14 | + # https://github.com/googleapis/release-please/issues/2280. |
| 15 | + - uses: actions/setup-node@v4 |
| 16 | + with: |
| 17 | + node-version: 20 |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + - name: Install Task |
| 21 | + uses: arduino/setup-task@v2 |
| 22 | + - name: Install Dagger |
| 23 | + env: |
| 24 | + # renovate: datasource=github-tags depName=dagger/dagger versioning=semver |
| 25 | + DAGGER_VERSION: 0.13.3 |
| 26 | + run: | |
| 27 | + curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh |
| 28 | + - name: Create image and manifest |
| 29 | + env: |
| 30 | + REGISTRY_USER: ${{ github.actor }} |
| 31 | + REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + run: | |
| 33 | + task publish |
| 34 | + task manifest |
| 35 | + - name: Attach manifest to workflow run |
| 36 | + uses: actions/upload-artifact@v4 |
| 37 | + with: |
| 38 | + name: manifest.yaml |
| 39 | + path: ./manifest.yaml |
| 40 | + # TODO: remove bump-minor-pre-major when in production. It prevents |
| 41 | + # release-please from bumping the major version on breaking changes. |
| 42 | + # TODO: remove release-as after first release. Used to set the first |
| 43 | + # release version, which would default to 1.0.0. Set the version |
| 44 | + # manually also for 1.0.0. |
| 45 | + # We use a GitHub token with write permissions to create the release, |
| 46 | + # otherwise we won't be able to trigger a new run when pushing on main. |
| 47 | + - name: Run release-please |
| 48 | + run: | |
| 49 | + npx release-please release-pr \ |
| 50 | + --token="${{ secrets.REPO_PAT }}" \ |
| 51 | + --repo-url="${{ github.repository }}" \ |
| 52 | + --bump-minor-pre-major=true \ |
| 53 | + --release-as=0.1.0 \ |
| 54 | + --signoff "Peggie <[email protected]>"; |
| 55 | + npx release-please github-release \ |
| 56 | + --token="${{ secrets.REPO_PAT }}" \ |
| 57 | + --repo-url="${{ github.repository }}" |
0 commit comments