-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from tiavina-mika/develop
Develop
- Loading branch information
Showing
3 changed files
with
101 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: GitHub Actions Demo | ||
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | ||
on: [push] | ||
jobs: | ||
Explore-GitHub-Actions: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | ||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | ||
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | ||
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||
- name: List files in the repository | ||
run: | | ||
ls ${{ github.workspace }} | ||
- run: echo "🍏 This job's status is ${{ job.status }}." |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Publish Package to npmjs | ||
run-name: ${{ github.actor }} publish to npm 🚀 | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
# Then release to npm | ||
build: | ||
name: Lint and build | ||
runs-on: ubuntu-latest | ||
|
||
# needs: [build-test] # Require standard CI steps to pass before publishing | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN | ||
# to work below. | ||
- name: Install Nodejs | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Setup Yarn in Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
cache: "yarn" # uses the system node, which was updated prior. | ||
|
||
- name: Install dependencies | ||
run: yarn | ||
|
||
- name: Lint and clean code | ||
run: yarn lint | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
# Then release to npm | ||
release: | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
id-token: write # Needed for https://docs.npmjs.com/generating-provenance-statements | ||
strategy: | ||
matrix: | ||
node-version: [18] | ||
|
||
|
||
needs: [build] # Require standard CI steps to pass before publishing | ||
|
||
steps: | ||
# - name: Checkout repo | ||
# run: echo "${{ github.event_name }} on ${{ github.ref }}." | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
# Set up .npmrc file to publish to npm. This also allows NODE_AUTH_TOKEN | ||
# to work below. | ||
- name: Install Nodejs | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "18.x" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
# - name: Setup Yarn in Node | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# cache: "yarn" # uses the system node, which was updated prior. | ||
|
||
- name: yarn publish --provenance | ||
# - run: yarn publish --provenance | ||
uses: ./ | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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 |
---|---|---|
|
@@ -23,7 +23,7 @@ | |
"email": "[email protected]", | ||
"github": "https://github.com/tiavina-mika" | ||
}, | ||
"version": "0.1.36", | ||
"version": "0.1.4", | ||
"license": "MIT", | ||
"type": "module", | ||
"types": "./dist/index.d.ts", | ||
|