Skip to content

Commit

Permalink
update: publish jobs update (#8317)
Browse files Browse the repository at this point in the history
<!--
Thank you for your contribution.

Before making a PR, please read our contributing guidelines at

https://github.com/DevExpress/testcafe/blob/master/CONTRIBUTING.md#code-contribution

We recommend creating a *draft* PR, so that you can mark it as 'ready
for review' when you are done.
-->

## Purpose
_Describe the problem you want to address or the feature you want to
implement._

## Approach
_Describe how your changes address the issue or implement the desired
functionality in as much detail as possible._

## References
_Provide a link to the existing issue(s), if any._

## Pre-Merge TODO
- [ ] Write tests for your proposed changes
- [ ] Make sure that existing tests do not fail

Co-authored-by: Bayheck <[email protected]>
  • Loading branch information
Bayheck and Bayheck authored Oct 29, 2024
1 parent f3fe938 commit c516f7b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,27 @@ on:
types: [published]

jobs:
publish:
npm-publish:
if: ${{ !github.event.release.draft }}
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}
- run: git fetch --force --tags
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run publish-please-only
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
docker-publish:
needs: npm-publish
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -23,6 +40,6 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: npm install
- run: npm run publish-please-only
- run: gulp docker-publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .publishrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"confirm": false,
"publishTag": "rc",
"prePublishScript": "gulp test-server",
"postPublishScript": "gulp docker-publish"
"postPublishScript": ""
}

0 comments on commit c516f7b

Please sign in to comment.