File tree Expand file tree Collapse file tree 3 files changed +44
-34
lines changed Expand file tree Collapse file tree 3 files changed +44
-34
lines changed Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ public function getFiles(): array
112
112
],
113
113
[
114
114
'scope ' => 'default ' ,
115
- 'destination ' => '.travis .yml ' ,
116
- 'template ' => 'web/.travis .yml.twig ' ,
115
+ 'destination ' => '.github/workflows/publish .yml ' ,
116
+ 'template ' => 'web/.github/workflows/publish .yml.twig ' ,
117
117
],
118
118
[
119
119
'scope ' => 'enum ' ,
Original file line number Diff line number Diff line change
1
+ name: Publish to NPM
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+
15
+ # Setup Node.js environment
16
+ - name: Use Node.js
17
+ uses: actions/setup-node@v4
18
+ with:
19
+ node-version: '20.x'
20
+ registry-url: 'https://registry.npmjs.org'
21
+
22
+ # Determine release tag based on the tag name
23
+ - name: Determine release tag
24
+ id: release_tag
25
+ run: |
26
+ if [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-rc"* ]] || [[ "${{ ' {{' }} github.ref {{ ' }}' }}" == *"-RC"* ]]; then
27
+ echo "tag=next" >> "$GITHUB_OUTPUT"
28
+ else
29
+ echo "tag=latest" >> "$GITHUB_OUTPUT"
30
+ fi
31
+
32
+ # Install dependencies (if any) and build your project (if necessary)
33
+ - name: Install dependencies and build
34
+ run: |
35
+ npm install
36
+ npm run build
37
+
38
+ # Publish to NPM with the appropriate tag
39
+ - name: Publish
40
+ run: npm publish --tag ${{ ' {{' }} steps.release_tag.outputs.tag {{ ' }}' }}
41
+ env:
42
+ NODE_AUTH_TOKEN: ${{ ' {{' }} secrets.NPM_TOKEN {{ ' }}' }}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments