Skip to content

feat: add npm package links for Docker, Home Lab, and Mobile tools #3

feat: add npm package links for Docker, Home Lab, and Mobile tools

feat: add npm package links for Docker, Home Lab, and Mobile tools #3

Workflow file for this run

name: Release
on:
push:
branches: [main]
paths-ignore:
- "*.md"
- "docs/**"
- "standards/**"
- "LICENSE"
- ".github/release-drafter.yml"
permissions:
contents: write
concurrency:
group: release
cancel-in-progress: false
jobs:
release:
name: Create release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: tag
run: |
TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "current=$TAG" >> "$GITHUB_OUTPUT"
- name: Determine version bump
id: bump
run: |
CURRENT="${{ steps.tag.outputs.current }}"
CURRENT="${CURRENT#v}"
IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT"
COMMITS=$(git log "${{ steps.tag.outputs.current }}..HEAD" --pretty=format:"%s" 2>/dev/null || git log --pretty=format:"%s")
if echo "$COMMITS" | grep -qE "^feat!:|BREAKING CHANGE"; then
MAJOR=$((MAJOR + 1))
MINOR=0
PATCH=0
elif echo "$COMMITS" | grep -qE "^feat(\(.*\))?:"; then
MINOR=$((MINOR + 1))
PATCH=0
else
PATCH=$((PATCH + 1))
fi
NEW="$MAJOR.$MINOR.$PATCH"
echo "version=$NEW" >> "$GITHUB_OUTPUT"
echo "tag=v$NEW" >> "$GITHUB_OUTPUT"
- name: Create tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "${{ steps.bump.outputs.tag }}" -m "Release ${{ steps.bump.outputs.tag }}"
git push origin "${{ steps.bump.outputs.tag }}"
- name: Create GitHub Release
run: |
gh release create "${{ steps.bump.outputs.tag }}" \
--title "${{ steps.bump.outputs.tag }}" \
--generate-notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}