refactor: Publish Packages action
This commit is contained in:
12
.github/workflows/publish.yml
vendored
12
.github/workflows/publish.yml
vendored
@@ -49,21 +49,22 @@ jobs:
|
||||
- name: Test
|
||||
run: yarn test
|
||||
|
||||
E2E Test Suite:
|
||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false && contains(github.event.head_commit.message, 'chore(release): publish') == false }}"
|
||||
needs: Build
|
||||
steps:
|
||||
- name: Login to Docker Hub
|
||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Publish SNJS Docker image for E2E testing
|
||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
||||
run: |
|
||||
yarn docker build @standardnotes/snjs -t standardnotes/snjs:${{ github.sha }}
|
||||
docker push standardnotes/snjs:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
||||
uses: convictional/trigger-workflow-and-wait@master
|
||||
with:
|
||||
owner: standardnotes
|
||||
@@ -76,6 +77,10 @@ jobs:
|
||||
trigger_workflow: true
|
||||
wait_workflow: true
|
||||
|
||||
Version & Publish:
|
||||
if: "${{ contains(github.event.head_commit.message, 'chore(release): publish') == false }}"
|
||||
needs: [Build, E2E Test Suite]
|
||||
steps:
|
||||
- name: Bump version
|
||||
run: yarn release:prod
|
||||
|
||||
@@ -89,3 +94,4 @@ jobs:
|
||||
run: |
|
||||
docker tag standardnotes/snjs:${{ github.sha }} standardnotes/snjs:latest
|
||||
docker push standardnotes/snjs:latest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user