diff --git a/.github/workflows/npm-alpha-publish.yml b/.github/workflows/npm-alpha-publish.yml new file mode 100644 index 00000000..23812216 --- /dev/null +++ b/.github/workflows/npm-alpha-publish.yml @@ -0,0 +1,53 @@ +name: Publish Alpha Version + +on: + push: + branches: + - alpha-release + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Install dependencies + run: npm ci + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + npm version prerelease --preid=alpha + npm publish --tag alpha \ No newline at end of file