chore(cli): add test for default option with empty type (#272) #24
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: Release | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+*" | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
permissions: | |
contents: write # To write to release | |
id-token: write # To deploy to GitHub Pages | |
pages: write # To deploy to GitHub Pages | |
jobs: | |
crate: | |
runs-on: ubuntu-latest | |
environment: crate | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-cargo- | |
- run: cargo publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
docker: | |
runs-on: ubuntu-latest | |
environment: docker | |
needs: | |
- info | |
steps: | |
- uses: docker/setup-qemu-action@v2 | |
- uses: docker/setup-buildx-action@v2 | |
- uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: docker/build-push-action@v4 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: 1915keke/commitlint-rs:${{ needs.info.outputs.tag }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
info: | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.info.outputs.tag }} | |
steps: | |
- id: info | |
run: echo tag=$(echo $GITHUB_REF | cut -d / -f 3 | sed -e 's/v//') >> $GITHUB_OUTPUT | |
publish: | |
runs-on: ubuntu-latest | |
needs: | |
- crate | |
- docker | |
- web | |
steps: | |
- uses: ncipollo/release-action@v1 | |
with: | |
generateReleaseNotes: true | |
web: | |
runs-on: ubuntu-latest | |
environment: | |
name: web | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: withastro/action@v0 | |
with: | |
path: ./web | |
- id: deployment | |
uses: actions/deploy-pages@v2 |