diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..e1ccdbd --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,37 @@ +name: Publish to npm with Yarn + +on: + push: + branches: + - release + pull_request: + branches: + - release + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.9.0 + + - name: Install Yarn + run: npm install -g yarn@3.3.1 + + - name: Install dependencies with Yarn + run: yarn install --frozen-lockfile + + - name: Run tests with Yarn + run: yarn test + + - name: Publish to npm with Yarn + if: github.event_name == 'push' && github.ref == 'refs/heads/release' + run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/update-main.yml b/.github/workflows/update-main.yml new file mode 100644 index 0000000..0066c20 --- /dev/null +++ b/.github/workflows/update-main.yml @@ -0,0 +1,31 @@ +name: Publish to npm with Yarn + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.9.0 + + - name: Install Yarn + run: npm install -g yarn@3.3.1 + + - name: Install dependencies with Yarn + run: yarn install --frozen-lockfile + + - name: Run tests with Yarn + run: yarn test diff --git a/package.json b/package.json index d729a5d..7896251 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "workspaces": [ "packages/*" ], - "version": "1.0.2", + "version": "1.0.3", "author": "samcyn ", "license": "MIT", "devDependencies": {