|
1 | | -# RELEASE PLEASE WORKFLOW |
2 | | -# This workflow automates versioning and releases using Google's Release Please. |
3 | | -# |
4 | | -# How it works: |
5 | | -# 1. On every push to main, Release Please analyzes conventional commits |
6 | | -# 2. It creates/updates a "Release PR" with version bumps and CHANGELOG |
7 | | -# 3. When you merge the Release PR, it creates tags and GitHub releases |
8 | | -# 4. The publish workflow then publishes to npm |
9 | | -# |
10 | | -# Commit types and their effects: |
11 | | -# - feat: → minor version bump (1.0.0 → 1.1.0) |
12 | | -# - fix: → patch version bump (1.0.0 → 1.0.1) |
13 | | -# - feat!: or BREAKING CHANGE: → major version bump (1.0.0 → 2.0.0) |
14 | | -# - chore:, docs:, style:, refactor:, test: → no version bump |
15 | | -# |
16 | | -# For monorepo packages, use scopes: |
17 | | -# - feat(angular-3d): new feature → bumps @hive-academy/angular-3d |
18 | | -# - fix(angular-gsap): bug fix → bumps @hive-academy/angular-gsap |
19 | | - |
20 | | -name: Release Please |
21 | | - |
22 | | -on: |
23 | | - push: |
24 | | - branches: |
25 | | - - main |
26 | | - workflow_dispatch: # Allow manual trigger |
27 | | - |
28 | | -permissions: |
29 | | - contents: write |
30 | | - pull-requests: write |
31 | | - |
32 | | -jobs: |
33 | | - release-please: |
34 | | - runs-on: ubuntu-latest |
35 | | - outputs: |
36 | | - angular-3d--release_created: ${{ steps.release.outputs['libs/angular-3d--release_created'] }} |
37 | | - angular-3d--tag_name: ${{ steps.release.outputs['libs/angular-3d--tag_name'] }} |
38 | | - angular-3d--version: ${{ steps.release.outputs['libs/angular-3d--version'] }} |
39 | | - angular-gsap--release_created: ${{ steps.release.outputs['libs/angular-gsap--release_created'] }} |
40 | | - angular-gsap--tag_name: ${{ steps.release.outputs['libs/angular-gsap--tag_name'] }} |
41 | | - angular-gsap--version: ${{ steps.release.outputs['libs/angular-gsap--version'] }} |
42 | | - steps: |
43 | | - - name: Run Release Please |
44 | | - id: release |
45 | | - uses: googleapis/release-please-action@v4 |
46 | | - with: |
47 | | - token: ${{ secrets.GITHUB_TOKEN }} |
48 | | - config-file: release-please-config.json |
49 | | - manifest-file: .release-please-manifest.json |
50 | | - |
51 | | - # Publish @hive-academy/angular-3d when released |
52 | | - publish-angular-3d: |
53 | | - needs: release-please |
54 | | - if: needs.release-please.outputs.angular-3d--release_created == 'true' |
55 | | - runs-on: ubuntu-latest |
56 | | - permissions: |
57 | | - contents: read |
58 | | - id-token: write # For npm provenance |
59 | | - steps: |
60 | | - - name: Checkout code |
61 | | - uses: actions/checkout@v4 |
62 | | - |
63 | | - - name: Setup Node.js |
64 | | - uses: actions/setup-node@v4 |
65 | | - with: |
66 | | - node-version: 20 |
67 | | - cache: 'npm' |
68 | | - registry-url: 'https://registry.npmjs.org' |
69 | | - |
70 | | - - name: Install dependencies |
71 | | - run: npm ci |
72 | | - |
73 | | - - name: Build |
74 | | - run: npx nx build angular-3d |
75 | | - |
76 | | - - name: Publish to npm |
77 | | - run: | |
78 | | - cd dist/libs/angular-3d |
79 | | - npm publish --access public --provenance |
80 | | - env: |
81 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
82 | | - |
83 | | - - name: Summary |
84 | | - run: | |
85 | | - echo "## 🚀 Published @hive-academy/angular-3d@${{ needs.release-please.outputs.angular-3d--version }}" >> $GITHUB_STEP_SUMMARY |
86 | | - echo "" >> $GITHUB_STEP_SUMMARY |
87 | | - echo "**Tag:** ${{ needs.release-please.outputs.angular-3d--tag_name }}" >> $GITHUB_STEP_SUMMARY |
88 | | -
|
89 | | - # Publish @hive-academy/angular-gsap when released |
90 | | - publish-angular-gsap: |
91 | | - needs: release-please |
92 | | - if: needs.release-please.outputs.angular-gsap--release_created == 'true' |
93 | | - runs-on: ubuntu-latest |
94 | | - permissions: |
95 | | - contents: read |
96 | | - id-token: write # For npm provenance |
97 | | - steps: |
98 | | - - name: Checkout code |
99 | | - uses: actions/checkout@v4 |
100 | | - |
101 | | - - name: Setup Node.js |
102 | | - uses: actions/setup-node@v4 |
103 | | - with: |
104 | | - node-version: 20 |
105 | | - cache: 'npm' |
106 | | - registry-url: 'https://registry.npmjs.org' |
107 | | - |
108 | | - - name: Install dependencies |
109 | | - run: npm ci |
110 | | - |
111 | | - - name: Build |
112 | | - run: npx nx build angular-gsap |
113 | | - |
114 | | - - name: Publish to npm |
115 | | - run: | |
116 | | - cd dist/libs/angular-gsap |
117 | | - npm publish --access public --provenance |
118 | | - env: |
119 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
120 | | - |
121 | | - - name: Summary |
122 | | - run: | |
123 | | - echo "## 🚀 Published @hive-academy/angular-gsap@${{ needs.release-please.outputs.angular-gsap--version }}" >> $GITHUB_STEP_SUMMARY |
124 | | - echo "" >> $GITHUB_STEP_SUMMARY |
125 | | - echo "**Tag:** ${{ needs.release-please.outputs.angular-gsap--tag_name }}" >> $GITHUB_STEP_SUMMARY |
| 1 | +# RELEASE PLEASE WORKFLOW |
| 2 | +# This workflow automates versioning and releases using Google's Release Please. |
| 3 | +# |
| 4 | +# How it works: |
| 5 | +# 1. On every push to main, Release Please analyzes conventional commits |
| 6 | +# 2. It creates/updates a "Release PR" with version bumps and CHANGELOG |
| 7 | +# 3. When you merge the Release PR, it creates tags and GitHub releases |
| 8 | +# 4. The publish workflow then publishes to npm |
| 9 | +# |
| 10 | +# Commit types and their effects: |
| 11 | +# - feat: → minor version bump (1.0.0 → 1.1.0) |
| 12 | +# - fix: → patch version bump (1.0.0 → 1.0.1) |
| 13 | +# - feat!: or BREAKING CHANGE: → major version bump (1.0.0 → 2.0.0) |
| 14 | +# - chore:, docs:, style:, refactor:, test: → no version bump |
| 15 | +# |
| 16 | +# For monorepo packages, use scopes: |
| 17 | +# - feat(angular-3d): new feature → bumps @hive-academy/angular-3d |
| 18 | +# - fix(angular-gsap): bug fix → bumps @hive-academy/angular-gsap |
| 19 | + |
| 20 | +name: Release Please |
| 21 | + |
| 22 | +on: |
| 23 | + push: |
| 24 | + branches: |
| 25 | + - main |
| 26 | + workflow_dispatch: # Allow manual trigger |
| 27 | + |
| 28 | +permissions: |
| 29 | + contents: write |
| 30 | + pull-requests: write |
| 31 | + |
| 32 | +jobs: |
| 33 | + release-please: |
| 34 | + runs-on: ubuntu-latest |
| 35 | + outputs: |
| 36 | + angular-3d--release_created: ${{ steps.release.outputs['libs/angular-3d--release_created'] }} |
| 37 | + angular-3d--tag_name: ${{ steps.release.outputs['libs/angular-3d--tag_name'] }} |
| 38 | + angular-3d--version: ${{ steps.release.outputs['libs/angular-3d--version'] }} |
| 39 | + angular-gsap--release_created: ${{ steps.release.outputs['libs/angular-gsap--release_created'] }} |
| 40 | + angular-gsap--tag_name: ${{ steps.release.outputs['libs/angular-gsap--tag_name'] }} |
| 41 | + angular-gsap--version: ${{ steps.release.outputs['libs/angular-gsap--version'] }} |
| 42 | + steps: |
| 43 | + - name: Run Release Please |
| 44 | + id: release |
| 45 | + uses: googleapis/release-please-action@v4 |
| 46 | + with: |
| 47 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 48 | + config-file: release-please-config.json |
| 49 | + manifest-file: .release-please-manifest.json |
| 50 | + |
| 51 | + # Publish @hive-academy/angular-3d when released |
| 52 | + publish-angular-3d: |
| 53 | + needs: release-please |
| 54 | + if: needs.release-please.outputs.angular-3d--release_created == 'true' |
| 55 | + runs-on: ubuntu-latest |
| 56 | + permissions: |
| 57 | + contents: read |
| 58 | + id-token: write # For npm provenance |
| 59 | + steps: |
| 60 | + - name: Checkout code |
| 61 | + uses: actions/checkout@v4 |
| 62 | + |
| 63 | + - name: Setup Node.js |
| 64 | + uses: actions/setup-node@v4 |
| 65 | + with: |
| 66 | + node-version: 20 |
| 67 | + cache: 'npm' |
| 68 | + registry-url: 'https://registry.npmjs.org' |
| 69 | + |
| 70 | + - name: Install dependencies |
| 71 | + run: npm ci |
| 72 | + |
| 73 | + - name: Build |
| 74 | + run: npx nx build angular-3d |
| 75 | + |
| 76 | + - name: Publish to npm |
| 77 | + run: | |
| 78 | + cd dist/libs/angular-3d |
| 79 | + npm publish --access public --provenance |
| 80 | + env: |
| 81 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 82 | + |
| 83 | + - name: Summary |
| 84 | + run: | |
| 85 | + echo "## 🚀 Published @hive-academy/angular-3d@${{ needs.release-please.outputs.angular-3d--version }}" >> $GITHUB_STEP_SUMMARY |
| 86 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 87 | + echo "**Tag:** ${{ needs.release-please.outputs.angular-3d--tag_name }}" >> $GITHUB_STEP_SUMMARY |
| 88 | +
|
| 89 | + # Publish @hive-academy/angular-gsap when released |
| 90 | + publish-angular-gsap: |
| 91 | + needs: release-please |
| 92 | + if: needs.release-please.outputs.angular-gsap--release_created == 'true' |
| 93 | + runs-on: ubuntu-latest |
| 94 | + permissions: |
| 95 | + contents: read |
| 96 | + id-token: write # For npm provenance |
| 97 | + steps: |
| 98 | + - name: Checkout code |
| 99 | + uses: actions/checkout@v4 |
| 100 | + |
| 101 | + - name: Setup Node.js |
| 102 | + uses: actions/setup-node@v4 |
| 103 | + with: |
| 104 | + node-version: 20 |
| 105 | + cache: 'npm' |
| 106 | + registry-url: 'https://registry.npmjs.org' |
| 107 | + |
| 108 | + - name: Install dependencies |
| 109 | + run: npm ci |
| 110 | + |
| 111 | + - name: Build |
| 112 | + run: npx nx build angular-gsap |
| 113 | + |
| 114 | + - name: Publish to npm |
| 115 | + run: | |
| 116 | + cd dist/libs/angular-gsap |
| 117 | + npm publish --access public --provenance |
| 118 | + env: |
| 119 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 120 | + |
| 121 | + - name: Summary |
| 122 | + run: | |
| 123 | + echo "## 🚀 Published @hive-academy/angular-gsap@${{ needs.release-please.outputs.angular-gsap--version }}" >> $GITHUB_STEP_SUMMARY |
| 124 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 125 | + echo "**Tag:** ${{ needs.release-please.outputs.angular-gsap--tag_name }}" >> $GITHUB_STEP_SUMMARY |
0 commit comments