diff --git a/.github/workflows/publish-docker-image-every-release.yml b/.github/workflows/publish-docker-image-every-release.yml index 470c19f5bd61..7a3b0678993e 100644 --- a/.github/workflows/publish-docker-image-every-release.yml +++ b/.github/workflows/publish-docker-image-every-release.yml @@ -1,14 +1,42 @@ name: Publish Docker image every release - on: - release: - types: [published] push: - tags: - - '*' + branches: + - master + +permissions: + contents: read # for checkout jobs: + release: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write # to be able to publish a GitHub release + issues: write # to be able to comment on released issues + pull-requests: write # to be able to comment on released pull requests + id-token: write # to enable use of OIDC for npm provenance + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + registry-url: https://npm.pkg.github.com/ + node-version: "lts/*" + scope: "@nft42" + - run: npm install @semantic-release/git + - name: Release + env: + # GIT_AUTHOR_NAME: elijahboston + # GIT_AUTHOR_EMAIL: elijah@nameless.io + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}` + run: npx semantic-release publish-dev: + needs: release uses: ./.github/workflows/docker-release.yml with: service_name: blockscout-stealthtest @@ -18,6 +46,7 @@ jobs: DEVOPS_SERVICE_ACCOUNT_JSON: ${{ secrets.DEVOPS_SERVICE_ACCOUNT_JSON }} NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-staging: + needs: release uses: ./.github/workflows/docker-release.yml with: service_name: blockscout-stealthtest @@ -27,6 +56,7 @@ jobs: DEVOPS_SERVICE_ACCOUNT_JSON: ${{ secrets.DEVOPS_SERVICE_ACCOUNT_JSON }} NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-prod: + needs: release uses: ./.github/workflows/docker-release.yml with: service_name: blockscout-stealthtest diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml deleted file mode 100644 index e71ef7dfd0cc..000000000000 --- a/.github/workflows/publish-release.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Publish Release -on: - push: - branches: - - master - -permissions: - contents: read # for checkout - -jobs: - release: - name: Release - runs-on: ubuntu-latest - permissions: - contents: write # to be able to publish a GitHub release - issues: write # to be able to comment on released issues - pull-requests: write # to be able to comment on released pull requests - id-token: write # to enable use of OIDC for npm provenance - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - persist-credentials: false - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - registry-url: https://npm.pkg.github.com/ - node-version: "lts/*" - scope: "@nft42" - - run: npm install @semantic-release/git - - name: Release - env: - GIT_AUTHOR_NAME: elijahboston - GIT_AUTHOR_EMAIL: elijah@nameless.io - GH_TOKEN: ${{ secrets.NPM_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }}` - run: npx semantic-release \ No newline at end of file