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
|
- name: Test
|
||||||
run: yarn 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
|
- name: Login to Docker Hub
|
||||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: Publish SNJS Docker image for E2E testing
|
- name: Publish SNJS Docker image for E2E testing
|
||||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
|
||||||
run: |
|
run: |
|
||||||
yarn docker build @standardnotes/snjs -t standardnotes/snjs:${{ github.sha }}
|
yarn docker build @standardnotes/snjs -t standardnotes/snjs:${{ github.sha }}
|
||||||
docker push standardnotes/snjs:${{ github.sha }}
|
docker push standardnotes/snjs:${{ github.sha }}
|
||||||
|
|
||||||
- name: Run E2E test suite
|
- name: Run E2E test suite
|
||||||
if: "${{ contains(github.event.head_commit.message, 'skip e2e') == false }}"
|
|
||||||
uses: convictional/trigger-workflow-and-wait@master
|
uses: convictional/trigger-workflow-and-wait@master
|
||||||
with:
|
with:
|
||||||
owner: standardnotes
|
owner: standardnotes
|
||||||
@@ -76,6 +77,10 @@ jobs:
|
|||||||
trigger_workflow: true
|
trigger_workflow: true
|
||||||
wait_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
|
- name: Bump version
|
||||||
run: yarn release:prod
|
run: yarn release:prod
|
||||||
|
|
||||||
@@ -89,3 +94,4 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
docker tag standardnotes/snjs:${{ github.sha }} standardnotes/snjs:latest
|
docker tag standardnotes/snjs:${{ github.sha }} standardnotes/snjs:latest
|
||||||
docker push standardnotes/snjs:latest
|
docker push standardnotes/snjs:latest
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user