diff --git a/.github/workflows/publish-unstable.yml b/.github/workflows/publish-unstable.yml new file mode 100644 index 0000000000..d588045363 --- /dev/null +++ b/.github/workflows/publish-unstable.yml @@ -0,0 +1,30 @@ +name: Publish unstable +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + push: + branches: main + workflow_dispatch: +jobs: + publish-unstable: + name: Publish unstable + runs-on: ubuntu-latest + if: ${{ !startsWith(github.event.head_commit.message, 'release:') && !github.event.pull_request.draft }} + steps: + - name: Check out repository + uses: actions/checkout@v3 + fetch-depth: 1 + ref: ${{ github.head_ref || github.ref }} + - name: Use Node.js + uses: ./.github/actions/setup-node + - name: Install dependencies + run: yarn install + - name: Run publish script + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + run: | + git config user.email dev-tools-engineering@prismic.io + git config user.name "Slice Machine Bot" + git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main + yarn publish unstable --dry-run --tolerate-republish