Do not overwrite existing style tag values on native wordpress attach… #8
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: Version or Publish | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
pull-requests: write | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
package-infos: | |
name: Get Package Infos | |
runs-on: ubuntu-latest | |
outputs: | |
fullName: ${{ steps.package-infos.outputs.fullName }} | |
vendorName: ${{ steps.package-infos.outputs.vendorName }} | |
packageName: ${{ steps.package-infos.outputs.packageName }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Read and Write Package Infos to Output | |
id: package-infos | |
run: | | |
NAME=$(jq -r '.name' composer.json) | |
echo "fullName=${NAME}" >> $GITHUB_OUTPUT | |
echo "vendorName=${NAME%%/*}" >> $GITHUB_OUTPUT | |
echo "packageName=${NAME#*/}" >> $GITHUB_OUTPUT | |
cat "$GITHUB_OUTPUT" | |
release: | |
needs: package-infos | |
if: ${{ github.repository == needs.package-infos.outputs.fullName }} | |
name: Create Version PR or Publish | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Configure Git | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Rasso Hilber's Bot" | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Shared Setup | |
uses: ./.github/actions/shared-setup | |
# Run changesets action either if there are unreleased changesets (= a PR must be created) | |
# or if the commit message matches the release PR (= new versions must be published) | |
- name: Create changesets PR or Publish | |
id: cs | |
uses: changesets/action@v1 | |
with: | |
title: "[CI] Release" | |
commit: "[CI] Release" | |
version: pnpm run version | |
publish: pnpm changeset tag | |
env: | |
# Do not run husky/lintstaged | |
HUSKY: 0 | |
# Doesn't work with GITHUB_TOKEN for some reason | |
GITHUB_TOKEN: ${{ secrets.HIRASSO_ACTIONS_TOKEN }} |