diff --git a/.github/workflows/publish-latest.yml b/.github/workflows/publish-latest.yml index be049b05..693560d7 100644 --- a/.github/workflows/publish-latest.yml +++ b/.github/workflows/publish-latest.yml @@ -1,5 +1,3 @@ -# @format - name: Publish Latest Releases on: @@ -13,31 +11,29 @@ jobs: if: startsWith(github.ref, 'refs/tags/sgds/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 20 registry-url: 'https://registry.npmjs.org' - - run: npm ci - run: npm run lib:install - run: npm run lib:build - - run: cd lib/sgds - - run: npm publish --tag latest --access public + - run: npm publish ./lib/sgds --tag latest --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + publish-sgds-x-family: if: startsWith(github.ref, 'refs/tags/sgds-x-family/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 20 registry-url: 'https://registry.npmjs.org' - - run: npm ci - run: npm run sgds-x-family:install - run: npm run sgds-x-family:build - run: cd lib/sgds-x-family - run: npm publish --tag latest --access public env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish-pr.yml b/.github/workflows/publish-pr.yml index 0a859d89..19cda8d5 100644 --- a/.github/workflows/publish-pr.yml +++ b/.github/workflows/publish-pr.yml @@ -13,36 +13,45 @@ jobs: if: startsWith(github.ref, 'refs/tags/sgds/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Set Tag env + run: echo "NPM_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 20 registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm run lib:install + - run: npm run lib:install - run: npm run lib:build - - run: cd lib/sgds - - run: npm publish --tag alpha --access public + - run: npm publish ./lib/sgds --tag alpha --access public if: contains(env.NPM_TAG, 'alpha') - - run: npm publish --tag beta --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish ./lib/sgds --tag beta --access public if: contains(env.NPM_TAG, 'beta') env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + publish-sgds-x-family: if: startsWith(github.ref, 'refs/tags/sgds-x-family/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Set Tag env + run: echo "NPM_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - node-version: 14 + node-version: 20 registry-url: 'https://registry.npmjs.org' - run: npm ci - - run: npm run sgds-x-family:install - run: npm run sgds-x-family:build - run: cd lib/sgds-x-family - run: npm publish --tag alpha --access public if: contains(env.NPM_TAG, 'alpha') + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npm publish --tag beta --access public if: contains(env.NPM_TAG, 'beta') env: diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index 704a1590..00000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v20.8.0 \ No newline at end of file diff --git a/package.json b/package.json index 66a5e08b..bbfd91fe 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "@govtechsg/sgds", - "version": "1.0.0", - "description": "", + "name": "sgds", + "version": "0.0.0", + "description": "SGDS styling libraries monorepo", "repository": { "type": "git", "url": "https://github.com/govtechsg/sgds.git" @@ -10,17 +10,17 @@ "author": "Tey Liang Tai", "main": "", "scripts": { - "prepare": "husky install", - "portal:install": "cd portal && npm i && bundle install", - "lib:install": "cd lib/sgds && npm i", - "sgds-x-family:install": "cd lib/sgds-x-family && npm i", - "install": "concurrently \"npm i\" \"npm run lib:install\" \"npm run portal:install\" \"npm run sgds-x-family:install\"", - "lib:build": "cd lib/sgds && npm run build", - "portal:build": "cd portal && npm run build", - "build": "npm run lib:build && npm run portal:build", - "sgds-x-family:build": "cd lib/sgds-x-family && npm run build", - "portal:dev": "cd portal && npm run dev", - "react-select:dev": "cd lib/sgds-x-family && npm run react-select:dev" + "prepare": "husky install", + "portal:install": "cd portal && npm i && bundle install", + "lib:install": "cd lib/sgds && npm i", + "sgds-x-family:install": "cd lib/sgds-x-family && npm i", + "install": "concurrently \"npm run lib:install\" \"npm run portal:install\" \"npm run sgds-x-family:install\"", + "lib:build": "cd lib/sgds && npm run build", + "portal:build": "cd portal && npm run build", + "build": "npm run lib:build && npm run portal:build", + "sgds-x-family:build": "cd lib/sgds-x-family && npm run build", + "portal:dev": "cd portal && npm run dev", + "react-select:dev": "cd lib/sgds-x-family && npm run react-select:dev" }, "devDependencies": { "@commitlint/cli": "^17.0.3",