Skip to content

release: v1.0.7

release: v1.0.7 #8

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint and validate
run: npm run check
- name: Validate release metadata
run: npm run release:check -- "${GITHUB_REF_NAME}"
- name: Extract release notes
run: npm run changelog:extract -- "${GITHUB_REF_NAME}" > release-notes.md
- name: Compute release version
id: version
run: echo "value=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Create release archive
run: |
git archive \
--format=tar.gz \
--prefix="bzo-${{ steps.version.outputs.value }}/" \
-o "bzo-${{ steps.version.outputs.value }}.tar.gz" \
"$GITHUB_SHA"
- name: Compute image name
id: image
run: echo "name=ghcr.io/$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build --no-cache --progress=plain \
-t ${{ steps.image.outputs.name }}:${{ steps.version.outputs.value }} \
-t ${{ steps.image.outputs.name }}:latest \
.
- name: Push Docker image
run: |
docker push ${{ steps.image.outputs.name }}:${{ steps.version.outputs.value }}
docker push ${{ steps.image.outputs.name }}:latest
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
files: |
bzo-${{ steps.version.outputs.value }}.tar.gz