chore(deps): bump sqids from 0.4.1 to 0.4.2 #468
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: Build Pipeline # A Build Pipeline which will use for build, test and deploy. | |
on: | |
push: # When we push the changes. | |
branches: # Only for these branches. | |
- master | |
- bugfix/* | |
- hotfix/* | |
- release/* | |
paths-ignore: # Ignoring the markdown file changes. | |
- '**/*.md' | |
pull_request: # Also on pull request events. | |
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab. | |
jobs: | |
guard: | |
name: Usage guard | |
runs-on: ubuntu-latest | |
steps: | |
# Uses the action-usage-guard action | |
- name: Run Action Usage Guard | |
uses: nekofar/action-usage-guard@develop | |
with: | |
# GitHub access token for authentication. | |
token: ${{ secrets.ACCESS_TOKEN }} | |
# Defines the threshold for the usage guard. | |
threshold: 70 | |
build: # Job named 'build' | |
name: Build & Test | |
runs-on: ubuntu-latest # The type of machine to run the job on. | |
needs: [ guard ] | |
steps: # The sequence of tasks that make up a job. | |
- name: Checking out repository code | |
uses: actions/checkout@v4.2.2 # Action for checking out a repo. | |
# Cache dependencies to speed up builds | |
- name: Cache cargo dependencies | |
uses: actions/cache@v4.2.0 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1.0.7 | |
with: | |
toolchain: stable | |
target: wasm32-unknown-unknown | |
override: true | |
- name: Check for errors | |
uses: actions-rs/cargo@v1.0.3 | |
with: | |
command: check | |
- name: Install worker-build | |
uses: actions-rs/cargo@v1.0.3 | |
with: | |
command: install | |
args: worker-build --force | |
- name: Build by worker-build | |
run: worker-build | |
release: | |
name: Create Release | |
# Specify the type of the runner the job will run on | |
runs-on: ubuntu-latest | |
needs: [ build ] | |
if: ${{ github.ref_name == 'master' }} | |
# Set permissions to write contents | |
permissions: | |
contents: write | |
steps: | |
# Checkout the repository code | |
- name: Checkout code | |
uses: actions/checkout@v4.2.2 | |
with: | |
fetch-depth: 0 # Fetches all history for all branches and tags | |
# Generate a changelog for the new release using Git | |
- name: Generate a changelog | |
uses: orhun/git-cliff-action@v4.4.2 | |
id: git-cliff | |
with: | |
config: cliff.toml # The configuration file for git-cliff | |
args: -vv --latest --strip all # Show verbose output, grab the latest changes, and strip unnecessary details | |
env: | |
OUTPUT: CHANGES.md # The output file for the changelog | |
# Prepare release notes by processing the generated changelog | |
- name: Set the release info | |
id: release | |
shell: bash | |
run: | | |
version=$(awk -F '"' '/^version/ {print $2}' Cargo.toml) | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
# Read contents of changelog into variable 'changelog_content' | |
changelog=$(cat ${{ steps.git-cliff.outputs.changelog }}) | |
# Remove first two lines from 'changelog' | |
changelog="$(printf "$changelog" | tail -n +3)" | |
# Save the value of 'changelog' back into the GitHub environment output | |
{ | |
echo "notes<<EOF" | |
echo "$changelog" | |
echo "EOF" | |
} >> $GITHUB_OUTPUT | |
# Create a new GitHub release using the gathered information | |
- name: Create the release | |
uses: nekofar/create-github-release@v1.0.14 | |
with: | |
tag: v${{ steps.release.outputs.version }} # The name of the tag to be released | |
title: v${{ steps.release.outputs.version }} # The title for the release | |
notes: ${{ steps.release.outputs.notes }} # The release notes generated in the previous step | |
draft: true # The release will be created as a draft | |
prerelease: ${{ contains(steps.release.outputs.version, '-rc') || contains(steps.release.outputs.version, '-beta') || contains(steps.release.outputs.version, '-alpha') }} # Conditions to mark the release as a pre-release | |
concurrency: # Allows controlling the concurrency level of the job in the build pipeline. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true # If enabled, previous runs of this workflow for the same group-key will be canceled while this build or run is in progress. |