Skip to content

Commit

Permalink
Workflow refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kacperzuk-neti committed Sep 13, 2024
1 parent 21068ba commit bbe8608
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/publish-new-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,18 @@ on:
default: 'latest'

jobs:
format-and-lint:
code-check:
uses: ./.github/workflows/code-check.yml

bump-version:
runs-on: ubuntu-latest
needs: format-and-lint
needs: code-check
if: ${{ github.ref_name == 'main' && inputs.version != '' }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Install semver
run: npm install semver

Expand All @@ -52,6 +47,11 @@ jobs:
run: |
npm version ${{ inputs.version }} --no-git-tag-version
- name: Git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Commit version change
run: |
git commit -am "Update version to ${{ inputs.version }}"
Expand All @@ -60,7 +60,7 @@ jobs:
staging-only-publish:
uses: ./.github/workflows/build-docker-image.yml
needs:
- format-and-lint
- code-check
- bump-version
if: |
always() &&
Expand All @@ -72,7 +72,7 @@ jobs:

production-only-publish:
needs:
- format-and-lint
- code-check
- bump-version
uses: ./.github/workflows/build-docker-image.yml
if: |
Expand Down

0 comments on commit bbe8608

Please sign in to comment.