Skip to content

Merge pull request #2 from k8sgpt-ai/release-please--branches--main #7

Merge pull request #2 from k8sgpt-ai/release-please--branches--main

Merge pull request #2 from k8sgpt-ai/release-please--branches--main #7

Workflow file for this run

name: release
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
workflow_dispatch:
env:
REGISTRY: ghcr.io
GITHUB_PAGES_BRANCH: gh_pages
defaults:
run:
shell: bash
jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
# Release-please creates a PR that tracks all changes
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: google-github-actions/release-please-action@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee # v4
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
release:
needs: release-please
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [stable-x86_64-unknown-linux-gnu]
steps:
- uses: actions/checkout@master
- run: rustup toolchain install ${{ matrix.target }}
- name: Log in to Buf registry
env:
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
run: |
cargo login --registry buf "Bearer $BUF_TOKEN"
- run: cargo +${{ matrix.target }} build --release
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: power_nerd
token: ${{ secrets.GITHUB_TOKEN }}