@unite-us/app-create-referral 0.14.14 → 0.15.0-HBH-1296.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,26 @@
1
+ name: Semantic Release
2
+
3
+ on:
4
+ push:
5
+
6
+ permissions:
7
+ contents: write
8
+ issues: write
9
+ pull-requests: write
10
+
11
+ jobs:
12
+ release:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Run semantic release
20
+ uses: unite-us-devops/actions-common/semantic-release@v0.0.8
21
+ with:
22
+ npm_token: ${{ secrets.NPM_TOKEN }}
23
+ github_token: ${{ secrets.GITHUB_TOKEN }}
24
+ node_version: 18.20.0
25
+ npm_version: 10.8.2
26
+ build_command: "npm run build:dist"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unite-us/app-create-referral",
3
- "version": "0.14.14",
3
+ "version": "0.15.0-HBH-1296.2",
4
4
  "main": "./dist/index.js",
5
5
  "author": "Alex Morales",
6
6
  "dependencies": {
@@ -1,68 +0,0 @@
1
- name: 'Bump NPM version'
2
- on:
3
- pull_request:
4
- branches:
5
- - '*'
6
- jobs:
7
- build-and-publish:
8
- name: Publish alpha version
9
- runs-on: ubuntu-latest
10
- permissions:
11
- contents: write
12
- pull-requests: write
13
- repository-projects: write
14
- env:
15
- # See https://github.community/t/package-not-found-in-the-github-registry/16251
16
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
17
- steps:
18
- - name: Checkout code
19
- uses: actions/checkout@v4
20
-
21
- - name: Cache node modules
22
- uses: actions/cache@v4
23
- env:
24
- cache-name: cache-node-modules
25
- with:
26
- # npm cache files are stored in `~/.npm` on Linux/macOS
27
- path: ~/.npm
28
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}
29
- restore-keys: |
30
- ${{ runner.os }}-build-${{ env.cache-name }}-
31
- ${{ runner.os }}-build-
32
- ${{ runner.os }}-
33
-
34
- - name: Add .npmrc
35
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
36
-
37
- - name: Install dependencies (Using NPM_TOKEN)
38
- run: npm install
39
-
40
- - name: build
41
- run: npm run build:dist
42
-
43
- - name: Create Alpha Version
44
- id: publish_version
45
- run: |
46
- BRANCH_NAME=$(echo "${{ github.head_ref }}" | sed 's/[^[:alnum:]]/-/g' | tr -s '-')
47
- COMMIT_HASH=$(git rev-parse --short HEAD)
48
- PACKAGE_NAME=$(node -p "require('./package.json').name")
49
- CURRENT_VERSION=$(npm view "$PACKAGE_NAME" version)
50
-
51
- # Set alpha version and publish
52
- ALPHA_VERSION="${CURRENT_VERSION}-${BRANCH_NAME}-${COMMIT_HASH}"
53
-
54
- npm version "$ALPHA_VERSION" --no-git-tag-version
55
- npm publish --tag alpha
56
- echo "published_version=$ALPHA_VERSION" >> $GITHUB_OUTPUT
57
-
58
- - name: Post Comment
59
- if: success()
60
- run: |
61
- curl -L \
62
- -X POST \
63
- -H "Accept: application/vnd.github.v3+json" \
64
- -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
65
- -H "X-GitHub-Api-Version: 2022-11-28" \
66
- https://api.github.com/repos/unite-us-engineering/app-create-referral/issues/${{ github.event.pull_request.number }}/comments \
67
- -d '{"body":":package: Alpha version published: `${{ steps.publish_version.outputs.published_version }}`"}'
68
-
@@ -1,78 +0,0 @@
1
- name: 'build & publish'
2
- on:
3
- push:
4
- branches:
5
- - main
6
- jobs:
7
- bump-version:
8
- name: Bump Version
9
- runs-on: ubuntu-latest
10
-
11
- steps:
12
- - name: Checkout code
13
- uses: actions/checkout@v4
14
- with:
15
- ref: ${{ github.ref }}
16
-
17
- - name: 'cat package.json'
18
- run: cat ./package.json
19
-
20
- - name: Bump package.json version, commit changes, and create tag
21
- id: version-bump
22
- # using commit SHA instead of tag
23
- uses: unite-us-engineering/bump-version@86a47ad4714e18f882a65f4909989e5b5fdb9eea
24
- with:
25
- skip-push: 'true'
26
- commit-message: '[skip ci] bumps version to {{version}}'
27
- env:
28
- GITHUB_TOKEN: ${{ secrets.NPM_TOKEN }}
29
-
30
- - name: 'cat package.json'
31
- run: cat ./package.json
32
-
33
- - name: Push to main
34
- # using commit SHA instead of tag
35
- uses: unite-us-engineering/protected-branch-push@d9bf70d839887e5c1ac0391e0a3d610fbafa3bbd
36
- with:
37
- token: ${{ secrets.NPM_BUMP }}
38
- branch: main
39
- tags: 'true'
40
-
41
- build-and-publish:
42
- name: Builds and publishes release to NPM registry
43
- needs: bump-version
44
- runs-on: ubuntu-latest
45
- env:
46
- # See https://github.community/t/package-not-found-in-the-github-registry/16251
47
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
48
- steps:
49
- - name: Checkout code
50
- uses: actions/checkout@v4
51
- with:
52
- ref: main
53
- fetch-depth: 0
54
-
55
- - name: Cache node modules
56
- uses: actions/cache@v4
57
- env:
58
- cache-name: cache-node-modules
59
- with:
60
- # npm cache files are stored in `~/.npm` on Linux/macOS
61
- path: ~/.npm
62
- key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}
63
- restore-keys: |
64
- ${{ runner.os }}-build-${{ env.cache-name }}-
65
- ${{ runner.os }}-build-
66
- ${{ runner.os }}-
67
-
68
- - name: Add .npmrc
69
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> .npmrc
70
-
71
- - name: Install dependencies (Using NPM_TOKEN)
72
- run: npm install
73
-
74
- - name: build
75
- run: npm run build:dist
76
-
77
- - name: publish
78
- run: npm publish