Skip to content

Pack Plugins and Create Release #34

Pack Plugins and Create Release

Pack Plugins and Create Release #34

Workflow file for this run

name: Pack Plugins and Create Release
on:
page_build:
jobs:
pack-plugins:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.build.commit }}
- name: Get latest tag
id: get_tag
run: |
git fetch --tags
latest=$(git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -n1)
echo "Latest tag: $latest"
if [[ -z "$latest" ]]; then
echo "tag=v0.0.0" >> "$GITHUB_OUTPUT"
else
echo "tag=$latest" >> "$GITHUB_OUTPUT"
fi
- name: Bump patch version
id: bump_tag
run: |
old="${{ steps.get_tag.outputs.tag }}"
IFS='.' read -r major minor patch <<< "${old#v}"
new="v$major.$minor.$((patch+1))"
echo "New tag: $new"
echo "new_tag=$new" >> "$GITHUB_OUTPUT"
- name: Create Git tag
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
git tag ${{ steps.bump_tag.outputs.new_tag }}
git push origin ${{ steps.bump_tag.outputs.new_tag }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Pack plugins
run: |
python packer/pack.py
- name: Upload GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.bump_tag.outputs.new_tag }}
name: Release ${{ steps.bump_tag.outputs.new_tag }}
body: Auto‑generated release for commit `${{ github.event.build.commit }}`
files: artifacts/*.plugin