diff --git a/.github/workflows/docker_build_push.yml b/.github/workflows/docker_build_push.yml index 4471730..774e7f5 100644 --- a/.github/workflows/docker_build_push.yml +++ b/.github/workflows/docker_build_push.yml @@ -5,7 +5,7 @@ on: branches: main pull_request: release: - types: [created] + types: [published] workflow_dispatch: concurrency: diff --git a/.github/workflows/docker_utils.yml b/.github/workflows/docker_utils.yml index 112b875..8f86d83 100644 --- a/.github/workflows/docker_utils.yml +++ b/.github/workflows/docker_utils.yml @@ -43,6 +43,7 @@ jobs: tags: | type=ref,event=branch type=ref,event=pr + type=raw,value=latest,enable=${{ github.event_name == 'release' && github.event.action == 'published' && github.event.release.prerelease == false }} type=raw,value=test,enable={{is_default_branch}} type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} diff --git a/.github/workflows/npm-package.yml b/.github/workflows/npm-package.yml index 3bc6322..dbb2313 100644 --- a/.github/workflows/npm-package.yml +++ b/.github/workflows/npm-package.yml @@ -14,6 +14,13 @@ jobs: scope: '@topos-protocol' - run: npm ci - run: npm run build + + - run: npm publish --access public --tag next + if: "github.event.release.prerelease" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - run: npm publish --access public + if: "!github.event.release.prerelease" env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}