-
Notifications
You must be signed in to change notification settings - Fork 68
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
Showing
10 changed files
with
201 additions
and
64 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
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,56 @@ | ||
name: Publish @devtion | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
npm-publish: | ||
runs-on: ubuntu-22.04 | ||
environment: dev | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: "https://registry.npmjs.org" | ||
cache: yarn | ||
|
||
- name: Initialize Project | ||
run: | | ||
yarn install --immutable | ||
yarn build | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
|
||
- name: Install lerna | ||
run: | | ||
npm install -g [email protected] | ||
- name: Modify package name | ||
run: | | ||
sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@devtion\/devcli"/g' ./packages/phase2cli/package.json | ||
sed -i -e 's/"name": "@p0tion\/backend"/"name": "@devtion\/backend"/g' ./packages/backend/package.json | ||
sed -i -e 's/"name": "@p0tion\/actions"/"name": "@devtion\/actions"/g' ./packages/actions/package.json | ||
- name: Publish packages | ||
run: | | ||
# Prevent `git commit error` when running `lerna version` | ||
# It will not pushed to GitHub. It is ephemeral | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
git add . | ||
git commit -m "chore: publish packages" --no-verify | ||
echo "${{ vars.CLI_ENV_FILE }}" > ./packages/phase2cli/dist/.env | ||
lerna version 0.0.0-$(git rev-parse --short HEAD) --no-push --ignore-scripts --message "chore(release): publish packages" --yes | ||
lerna publish from-git --yes | ||
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish to NPM | ||
|
||
on: | ||
push: | ||
tags: ["*"] | ||
|
||
jobs: | ||
npm-publish: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: "https://registry.npmjs.org" | ||
cache: yarn | ||
|
||
- name: Initialize Project | ||
run: | | ||
yarn install --immutable | ||
yarn build | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
|
||
- name: Install lerna | ||
run: | | ||
npm install -g [email protected] | ||
- name: Publish packages | ||
run: | | ||
echo "${{ vars.CLI_ENV_FILE }}" > ./packages/phase2cli/dist/.env | ||
lerna publish from-git --yes | ||
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Publish @p0tion | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
npm-publish: | ||
runs-on: ubuntu-22.04 | ||
environment: production | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: "https://registry.npmjs.org" | ||
cache: yarn | ||
|
||
- name: Initialize Project | ||
run: | | ||
yarn install --immutable | ||
yarn build | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
|
||
- name: Install lerna | ||
run: | | ||
npm install -g [email protected] | ||
- name: Publish packages | ||
run: | | ||
echo "${{ vars.CLI_ENV_FILE }}" > ./packages/phase2cli/dist/.env | ||
lerna version 0.0.0-$(git rev-parse --short HEAD) --no-push --ignore-scripts --message "chore(release): publish packages" --yes | ||
lerna publish from-git --dist-tag ci --yes | ||
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Publish @stagtion | ||
|
||
on: | ||
push: | ||
branches: | ||
- staging | ||
|
||
jobs: | ||
npm-publish: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: "https://registry.npmjs.org" | ||
cache: yarn | ||
|
||
- name: Initialize Project | ||
run: | | ||
yarn install --immutable | ||
yarn build | ||
env: | ||
NODE_OPTIONS: "--max_old_space_size=4096" | ||
|
||
- name: Install lerna | ||
run: | | ||
npm install -g [email protected] | ||
- name: Modify package name | ||
run: | | ||
sed -i -e 's/"name": "@p0tion\/phase2cli"/"name": "@stagtion\/stagcli"/g' ./packages/phase2cli/package.json | ||
sed -i -e 's/"name": "@p0tion\/backend"/"name": "@stagtion\/backend"/g' ./packages/backend/package.json | ||
sed -i -e 's/"name": "@p0tion\/actions"/"name": "@stagtion\/actions"/g' ./packages/actions/package.json | ||
- name: Publish packages | ||
run: | | ||
# Prevent `git commit error` when running `lerna version` | ||
# It will not pushed to GitHub. It is ephemeral | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Your Name" | ||
git add . | ||
git commit -m "chore: publish packages" --no-verify | ||
echo "${{ vars.CLI_ENV_FILE }}" > ./packages/phase2cli/dist/.env | ||
lerna version 0.0.0-$(git rev-parse --short HEAD) --no-push --ignore-scripts --message "chore(release): publish packages" --yes | ||
lerna publish from-git --yes | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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