Skip to content

Commit

Permalink
ci: fix tagging deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
brynblack committed Jul 4, 2024
1 parent f1aad8f commit ca52081
Showing 1 changed file with 28 additions and 22 deletions.
50 changes: 28 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,37 @@ jobs:
name: cobertura-coverage
path: tmp/coverage/cobertura-coverage.json

build-prerelease:
name: "Build / Pre-release"
runs-on: ubuntu-latest
needs:
- check-lint
- check-build
- check-test
if: >
startsWith(github.ref, 'refs/tags/v') &&
contains(github.ref, '-')
steps:
- uses: actions/checkout@v4
- name: Run deployment
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc
echo 'Publishing library prerelease'
npm install
npm publish --tag prerelease --access public
rm -f ./.npmrc
build-pull:
name: "Build / Pull Request"
runs-on: ubuntu-latest
needs:
- check-lint
- check-build
- check-test
if: github.ref == 'refs/heads/staging'
if: >
github.ref == 'refs/heads/staging' ||
(startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref, '-'))
steps:
- uses: actions/checkout@v4
- name: Create pull request
Expand All @@ -121,34 +144,17 @@ jobs:
--body-file - \
--repo "$GITHUB_REPOSITORY"
build-prerelease:
name: "Build / Pre-release"
runs-on: ubuntu-latest
needs:
- check-lint
- check-build
- check-test
if: >
startsWith(github.ref, 'refs/tags/v') &&
contains(github.ref, '-')
steps:
- uses: actions/checkout@v4
- name: Run deployment
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ./.npmrc
echo 'Publishing library prerelease'
npm install
npm publish --tag prerelease --access public
rm -f ./.npmrc
integration-merge:
name: "Integration / Merge"
runs-on: ubuntu-latest
concurrency:
group: integration-merge
cancel-in-progress: true
needs: build-pull
if: github.ref == 'refs/heads/staging'
if: >
github.ref == 'refs/heads/staging' ||
(startsWith(github.ref, 'refs/tags/v') &&
!contains(github.ref, '-'))
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit ca52081

Please sign in to comment.