diff --git a/.github/workflows/release.yml b/.github/workflows/publish-github-release.yml similarity index 63% rename from .github/workflows/release.yml rename to .github/workflows/publish-github-release.yml index f67a9b4c..d4bc238d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/publish-github-release.yml @@ -1,17 +1,19 @@ -name: Release +name: Publish Github Release on: push: branches: - 'alpha' - 'beta' - - 'master' + - 'main' jobs: release: runs-on: ubuntu-latest env: + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} steps: @@ -28,3 +30,6 @@ jobs: - name: Semantic Release run: npx semantic-release + + - name: Publish to npm + run: npm publish ./dist/*.tgz --tag ${{ env.BRANCH_NAME == 'main' && 'latest' || '$BRANCH_NAME' }} diff --git a/package-lock.json b/package-lock.json index 6862923e..eb8a61fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@pixi/react", - "version": "8.0.0", + "version": "0.0.0-development", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@pixi/react", - "version": "8.0.0", + "version": "0.0.0-development", "license": "MIT", "dependencies": { "react-reconciler": "0.29.2" diff --git a/release.config.js b/release.config.js index bc55e3bf..f67f87fa 100644 --- a/release.config.js +++ b/release.config.js @@ -13,7 +13,12 @@ module.exports = { plugins: [ '@semantic-release/commit-analyzer', '@semantic-release/release-notes-generator', - // '@semantic-release/npm', - '@semantic-release/github', + ['@semantic-release/npm', { + npmPublish: false, + tarballDir: 'dist', + }], + ['@semantic-release/github', { + assets: 'dist/*.tgz', + }], ], };