Skip to content

fix: remove faulty import of removed sidebar js #267

fix: remove faulty import of removed sidebar js

fix: remove faulty import of removed sidebar js #267

Workflow file for this run

name: Bump version, build and create release
on:
push:
branches:
- main-1.x
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Bump version files (no release yet)
uses: helsingborg-stad/release-wp-plugin-action@main
with:
php-version: 8.2
node-version: 24.3.0
skip-release: true # custom flag you added
- name: Pull latest main-1.x with bumped version
run: |
git fetch origin main-1.x
git checkout main-1.x
git pull origin main-1.x
git checkout -B release
- name: Extract version
id: version
run: |
VERSION=$(jq -r '.version' package.json)
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Detected version: $VERSION"
# --- PHP Build ---
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Configure npm for GitHub Packages
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
echo "@helsingborg-stad:registry=https://npm.pkg.github.com" >> .npmrc
- name: Run PHP build script
run: php build.php --no-composer --cleanup --release
- name: Remove cached git files
run: |
git rm -r --cached .
- name: Overwrite .gitignore for release branch
run: |
cat > .gitignore <<'EOF'
/*
!/assets
!/source
!/component-design-tokens.json
!/composer.json
!/composer.lock
!/LICENSE
!/README.md
EOF
# --- Release Branch Commit ---
- name: Commit and push release branch
run: |
git config user.name "CI Release Bot"
git config user.email "ci@helsingborg.se"
git add .
git commit -m "Release build from $GITHUB_SHA" || echo "No changes to commit"
git push origin release --force
# --- Tag and create GitHub Release on release branch ---
- name: Create and push tag
run: |
TAG="${{ steps.version.outputs.version }}"
# skip if tag already exists
if git ls-remote --tags origin | grep -q "refs/tags/$TAG$"; then
echo "Tag $TAG already exists, skipping tag creation."
exit 0
fi
git tag "$TAG"
git push origin "$TAG"
- name: Wait for tag propagation
run: sleep 5
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.version }}
generateReleaseNotes: true