From 6c4f48047b43ecf50516e0ba2d89e593c8371100 Mon Sep 17 00:00:00 2001 From: Yannick Date: Tue, 31 Mar 2026 23:29:52 +0200 Subject: [PATCH] Fix casing --- .github/workflows/release.yml | 61 +++++------------------------------ amicons/package.json | 6 ++-- 2 files changed, 11 insertions(+), 56 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cad924cc..f6c85ac1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,45 +1,22 @@ name: Release on: - push: + pull_request: + types: [closed] branches: ["main", "next"] - workflow_dispatch: permissions: contents: write id-token: write - pull-requests: read jobs: release: name: Release Amicons - if: github.ref_name == 'main' + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - - name: Get PR metadata - id: pr - run: | - PR_NUMBER=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/pulls --jq '.[0].number' 2>/dev/null || true) - if [ -n "$PR_NUMBER" ]; then - TITLE=$(gh pr view "$PR_NUMBER" --json title --jq '.title') - BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body') - else - TITLE="${{ github.event.head_commit.message }}" - BODY="Automated release for commit ${{ github.sha }}." - fi - - { - echo "title<> "$GITHUB_OUTPUT" - env: - GH_TOKEN: ${{ github.token }} - name: Get version id: version run: echo "version=$(jq -r '.version' amicons/package.json)" >> $GITHUB_OUTPUT @@ -65,12 +42,12 @@ jobs: - name: Write release notes env: - BODY: ${{ steps.pr.outputs.body }} + BODY: ${{ github.event.pull_request.body }} run: echo "$BODY" > release-notes.md - name: Create GitHub release run: | gh release create v${{ steps.version.outputs.version }} \ - --title "${{ steps.pr.outputs.title }}" \ + --title "${{ github.event.pull_request.title }}" \ --notes-file release-notes.md \ "amicons-${{ steps.version.outputs.version }}-icons.zip#Amicons icons v${{ steps.version.outputs.version }}" env: @@ -81,33 +58,11 @@ jobs: prerelease: name: Prerelease Amicons - if: github.ref_name == 'next' + if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'next' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - - name: Get PR metadata - id: pr - run: | - PR_NUMBER=$(gh api repos/${{ github.repository }}/commits/${{ github.sha }}/pulls --jq '.[0].number' 2>/dev/null || true) - if [ -n "$PR_NUMBER" ]; then - TITLE=$(gh pr view "$PR_NUMBER" --json title --jq '.title') - BODY=$(gh pr view "$PR_NUMBER" --json body --jq '.body') - else - TITLE="${{ github.event.head_commit.message }}" - BODY="Automated prerelease for commit ${{ github.sha }}." - fi - - { - echo "title<> "$GITHUB_OUTPUT" - env: - GH_TOKEN: ${{ github.token }} - name: Get version id: version run: echo "version=$(jq -r '.version' amicons/package.json)" >> $GITHUB_OUTPUT @@ -139,12 +94,12 @@ jobs: - name: Write release notes env: - BODY: ${{ steps.pr.outputs.body }} + BODY: ${{ github.event.pull_request.body }} run: echo "$BODY" > release-notes.md - name: Create GitHub prerelease run: | gh release create ${{ steps.meta.outputs.tag }} \ - --title "${{ steps.pr.outputs.title }}" \ + --title "${{ github.event.pull_request.title }}" \ --prerelease \ --notes-file release-notes.md \ "amicons-${{ steps.meta.outputs.label }}-icons.zip#Amicons icons ${{ steps.meta.outputs.label }}" diff --git a/amicons/package.json b/amicons/package.json index c4df0350..9ea82a3d 100644 --- a/amicons/package.json +++ b/amicons/package.json @@ -1,6 +1,6 @@ { "name": "@studio384/amicons", - "version": "1.0.0-dev.3", + "version": "1.0.0-dev.4", "description": "The iconography.", "keywords": [ "iconography", @@ -9,13 +9,13 @@ ], "homepage": "https://studio384.github.io/amicons", "bugs": { - "url": "https://github.com/studio384/amicons/issues" + "url": "https://github.com/Studio384/amicons/issues" }, "license": "AGPL-3.0-or-later", "author": "", "repository": { "type": "git", - "url": "git+https://github.com/studio384/amicons.git" + "url": "git+https://github.com/Studio384/amicons.git" }, "files": [ "/icons",