Skip to content

Commit a009548

Browse files
authored
Merge pull request #5 from Studio384/1-alpha
Amicons 1.0 alpha 12 test 2
2 parents 7c9592e + 819ddb5 commit a009548

3 files changed

Lines changed: 57 additions & 68 deletions

File tree

.github/workflows/prerelease.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Release
33
on:
44
pull_request:
55
types: [closed]
6-
branches: ["main"]
6+
branches: ["main", "next"]
77

88
permissions:
99
contents: write
@@ -12,7 +12,7 @@ permissions:
1212
jobs:
1313
release:
1414
name: Release Amicons
15-
if: github.event.pull_request.merged == true
15+
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
@@ -47,11 +47,64 @@ jobs:
4747
- name: Create GitHub release
4848
run: |
4949
gh release create v${{ steps.version.outputs.version }} \
50-
--title "v${{ steps.version.outputs.version }}" \
50+
--title "${{ github.event.pull_request.title }}" \
5151
--notes-file release-notes.md \
5252
"amicons-${{ steps.version.outputs.version }}-icons.zip#Amicons icons v${{ steps.version.outputs.version }}"
5353
env:
5454
GH_TOKEN: ${{ github.token }}
5555
- name: Publish to npm
5656
working-directory: amicons
5757
run: pnpm publish --no-git-checks --access public --provenance
58+
59+
prerelease:
60+
name: Prerelease Amicons
61+
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'next'
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v6
66+
- name: Get version
67+
id: version
68+
run: echo "version=$(jq -r '.version' amicons/package.json)" >> $GITHUB_OUTPUT
69+
- name: Set prerelease metadata
70+
id: meta
71+
run: |
72+
echo "tag=v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
73+
echo "label=v${{ steps.version.outputs.version }}" >> $GITHUB_OUTPUT
74+
- name: Set up pnpm
75+
uses: pnpm/action-setup@v5
76+
with:
77+
version: 10.33.0
78+
- name: Set up Node 24
79+
uses: actions/setup-node@v6
80+
with:
81+
node-version: 24.x
82+
cache: "pnpm"
83+
cache-dependency-path: amicons/pnpm-lock.yaml
84+
registry-url: "https://registry.npmjs.org"
85+
- name: Install dependencies
86+
working-directory: amicons
87+
run: pnpm install --frozen-lockfile
88+
- name: Production build
89+
working-directory: amicons
90+
run: pnpm prod
91+
- name: Package icons
92+
working-directory: amicons
93+
run: zip -r ../amicons-${{ steps.meta.outputs.label }}-icons.zip icons -i "*.svg"
94+
95+
- name: Write release notes
96+
env:
97+
BODY: ${{ github.event.pull_request.body }}
98+
run: echo "$BODY" > release-notes.md
99+
- name: Create GitHub prerelease
100+
run: |
101+
gh release create ${{ steps.meta.outputs.tag }} \
102+
--title "${{ github.event.pull_request.title }}" \
103+
--prerelease \
104+
--notes-file release-notes.md \
105+
"amicons-${{ steps.meta.outputs.label }}-icons.zip#Amicons icons ${{ steps.meta.outputs.label }}"
106+
env:
107+
GH_TOKEN: ${{ github.token }}
108+
- name: Publish to npm (next)
109+
working-directory: amicons
110+
run: pnpm publish --no-git-checks --access public --provenance --tag next

amicons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@studio384/amicons",
3-
"version": "1.0.0-dev.1",
3+
"version": "1.0.0-dev.2",
44
"description": "The iconography.",
55
"keywords": [
66
"iconography",

0 commit comments

Comments
 (0)