-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Albert Hernandez Pellicer
committed
Feb 25, 2024
1 parent
3ab82d4
commit 0c98696
Showing
1 changed file
with
15 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,10 +17,13 @@ jobs: | |
- uses: benjlevesque/[email protected] | ||
id: short-sha | ||
- name: Log details | ||
env: | ||
BRANCH: ${{ github.event.pull_request.head.ref }} | ||
SHA: ${{ github.event.pull_request.head.sha }} | ||
run: | | ||
echo "Commit Short SHA: ${{ steps.short-sha.outputs.sha }}" | ||
echo "Commit SHA: ${{ github.event.pull_request.head.sha }}" | ||
echo "Branch: ${{ github.event.pull_request.head.ref }}" | ||
echo "Commit SHA: ${{ env.SHA }}" | ||
echo "Branch: ${{ env.BRANCH }}" | ||
- name: Setup Node ⚙️ | ||
uses: ./.github/actions/setup-node | ||
with: | ||
|
@@ -29,12 +32,16 @@ jobs: | |
run: npm run build && find dist/index.js | ||
- name: Normalize npm tag | ||
id: npm | ||
env: | ||
BRANCH: ${{ github.event.pull_request.head.ref }} | ||
run: | | ||
npm_tag=$(echo ${{ github.event.pull_request.head.ref }} | sed 's/\//-/g') | ||
npm_tag=$(echo ${{ env.BRANCH }} | sed 's/\//-/g') | ||
echo "NPM Tag: $npm_tag" | ||
echo "tag=$npm_tag" >> "$GITHUB_OUTPUT" | ||
- name: Update library version | ||
run: npm version --allow-same-version --no-git-tag-version prerelease --preid=rc.${{ github.event.pull_request.head.sha }} | ||
env: | ||
SHA: ${{ github.event.pull_request.head.sha }} | ||
run: npm version --allow-same-version --no-git-tag-version prerelease --preid=rc.${{ env.SHA }} | ||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
@@ -48,14 +55,17 @@ jobs: | |
utc=$(date -u +"%b %-d, %Y at %-I:%M%p (UTC)") | ||
echo "utc=$utc" >> "$GITHUB_OUTPUT" | ||
- uses: marocchino/sticky-pull-request-comment@v2 | ||
env: | ||
BRANCH: ${{ github.event.pull_request.head.ref }} | ||
SHA: ${{ github.event.pull_request.head.sha }} | ||
with: | ||
header: <release-candidate> | ||
message: | | ||
## ☁️ Release Candidate Preview | ||
📘 Name | 🔑 Latest Commit | 📦 NPM | 🕒 Updated | ||
--- | --- | ---| --- | ||
[typescript-library-template-example](https://github.com/AlbertHernandez/typescript-library-template/tree/${{ github.event.pull_request.head.ref }}) | [${{ steps.short-sha.outputs.sha }}](https://github.com/AlbertHernandez/typescript-library-template/commit/${{ github.event.pull_request.head.sha }}) | [NPM](https://www.npmjs.com/package/typescript-library-template-example/v/${{ steps.npm.outputs.tag }}) | ${{ steps.date.outputs.utc }} | ||
[typescript-library-template-example](https://github.com/AlbertHernandez/typescript-library-template/tree/${{ env.BRANCH }}) | [${{ steps.short-sha.outputs.sha }}](https://github.com/AlbertHernandez/typescript-library-template/commit/${{ env.SHA }}) | [NPM](https://www.npmjs.com/package/typescript-library-template-example/v/${{ steps.npm.outputs.tag }}) | ${{ steps.date.outputs.utc }} | ||
### 💻 Client installation | ||
|