Merge branch 'main' into fix/improve-release #104
Workflow file for this run
This file contains 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: Continuous Integration | |
on: | |
push: | |
workflow_call: | |
inputs: | |
release: | |
description: Build for release | |
required: false | |
type: boolean | |
upload_url: | |
description: The URL to upload the binaries to | |
required: false | |
type: string | |
version: | |
description: The version to update to | |
required: false | |
type: string | |
workflow_dispatch: | |
inputs: | |
platform: | |
description: Platform to build for | |
options: ['linux/amd64', 'linux/arm64', 'darwin/amd64', 'darwin/arm64', 'windows/amd64'] | |
required: true | |
type: choice | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
setup: | |
name: Setup CI | |
if: github.head_ref != 'chore/update-version' | |
runs-on: ubuntu-latest | |
steps: | |
- id: setup | |
shell: bash | |
run: | | |
if [ ${{github.event_name }} == 'workflow_dispatch' ]; then | |
echo "platform=${{ inputs.platform }}" >> $GITHUB_OUTPUT | |
elif [ ${{ inputs.release }} == 'true' ]; then | |
echo "platform=linux/amd64, linux/arm64, darwin/amd64, darwin/arm64, windows/amd64" >> $GITHUB_OUTPUT | |
else | |
echo "platform=linux/amd64, linux/arm64" >> $GITHUB_OUTPUT | |
fi | |
outputs: | |
platform: ${{ steps.setup.outputs.platform }} | |
build: | |
name: Build | |
needs: setup | |
uses: ./.github/workflows/build-rust.yml | |
secrets: inherit | |
with: | |
platform: ${{ needs.setup.outputs.platform }} | |
release: ${{ inputs.release == 'true' }} | |
upload_url: ${{ inputs.upload_url }} | |
docker: | |
name: Docker | |
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }} | |
needs: build | |
uses: ./.github/workflows/build-docker.yml | |
secrets: inherit | |
with: | |
platform: 'linux/amd64, linux/arm64' | |
version: ${{ inputs.version }} |