Skip to content

Commit c72331b

Browse files
authored
Merge pull request #18 from im-open/support-attributes
Adding support for script attributes.
2 parents c08462f + e5ee7a1 commit c72331b

File tree

12 files changed

+5924
-5726
lines changed

12 files changed

+5924
-5726
lines changed

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ module.exports = {
5656
"./*.js",
5757
"./scriptloader-support/*.js",
5858
"./useScriptLoader/*.js",
59-
"./release/**",
6059
],
6160
env: { node: true },
6261
},

.github/workflows/npm-publish.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ name: NPM Publish
66
on:
77
# Triggers the workflow on push or pull request events but only for the main branch
88
push:
9-
branches: ['**']
9+
branches: "**"
1010

1111
# Allows you to run this workflow manually from the Actions tab
1212
workflow_dispatch:
1313

14+
env:
15+
BRANCH_NAME: ${{ github.ref_name }}
16+
1417
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1518
jobs:
1619
# This workflow contains a single job called "release"
@@ -19,7 +22,7 @@ jobs:
1922
if: "!contains(github.event.head_commit.message, '[skip ci]')"
2023
steps:
2124
- name: Checkout
22-
uses: actions/checkout@v2
25+
uses: actions/checkout@v4
2326
with:
2427
persist-credentials: false
2528
- run: npm ci
@@ -34,12 +37,20 @@ jobs:
3437
# Steps represent a sequence of tasks that will be executed as part of the job
3538
steps:
3639
- name: Checkout
37-
uses: actions/checkout@v2
40+
uses: actions/checkout@v4
3841
with:
3942
persist-credentials: true
4043
token: ${{ secrets.PIPELINE_BOT_PAT }}
44+
45+
- uses: actions/setup-node@v4
46+
with:
47+
node-version: 20
48+
cache: "npm"
49+
4150
- run: npm ci
51+
4252
- name: Semantic Release
53+
id: semantic-release
4354
env:
4455
GITHUB_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
4556
GH_TOKEN: ${{ secrets.PIPELINE_BOT_PAT }}
@@ -49,3 +60,20 @@ jobs:
4960
GIT_COMMITTER_NAME: im-pipeline-bot
5061
GIT_COMMITTER_EMAIL: ${{ secrets.COMMITBOT_EMAIL }}
5162
run: npx semantic-release
63+
64+
- name: Comment on PR
65+
if: env.BRANCH_NAME != 'main'
66+
env:
67+
NEXT_VERSION: ${{ steps.semantic-release.outputs.NEXT_VERSION }}
68+
uses: im-open/[email protected]
69+
with:
70+
github-token: ${{ secrets.PIPELINE_BOT_PAT }}
71+
comment-identifier: "publish-comment" # this should not change
72+
pr-ref: ${{ github.sha }}
73+
comment-content: |
74+
This PR is part of this prerelease version for testing: **${{ env.NEXT_VERSION }}**
75+
76+
You can test it by using:
77+
```bash
78+
npm install scriptloader-component@${{ env.NEXT_VERSION }}
79+
```

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ dist
33
module
44
npm-debug.log
55
.DS_Store
6-
release/github-prerelease

0 commit comments

Comments
 (0)