ci: Combine build and release steps (#1532)
This commit is contained in:
@@ -18,10 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
# Fetch all tags, so semantic-release can calculate the correct next release.
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Do not remove credentials after checkout.
|
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
- uses: volta-cli/action@v4
|
- uses: volta-cli/action@v4
|
||||||
- run: yarn install --immutable
|
- run: yarn install --immutable
|
||||||
@@ -34,22 +31,21 @@ jobs:
|
|||||||
new-release-version: ${{ steps.get-next-version.outputs.new-release-version }}
|
new-release-version: ${{ steps.get-next-version.outputs.new-release-version }}
|
||||||
new-release-git-tag: ${{ steps.get-next-version.outputs.new-release-git-tag }}
|
new-release-git-tag: ${{ steps.get-next-version.outputs.new-release-git-tag }}
|
||||||
|
|
||||||
build:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: get-next-version
|
needs: get-next-version
|
||||||
if: needs.get-next-version.outputs.new-release-published == 'true'
|
if: needs.get-next-version.outputs.new-release-published == 'true'
|
||||||
steps:
|
steps:
|
||||||
- run: echo "The new release version is ${{ needs.get-next-version.outputs.new-release-version }}"
|
- uses: actions/checkout@v4
|
||||||
- run: echo "The new release git tag is ${{ needs.get-next-version.outputs.new-release-git-tag }}"
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: volta-cli/action@v4
|
||||||
|
- run: yarn install --immutable
|
||||||
- run: yarn run build
|
- run: yarn run build
|
||||||
env:
|
env:
|
||||||
RELEASE_VERSION: ${{ needs.get-next-version.outputs.new-release-version }}
|
RELEASE_VERSION: ${{ needs.get-next-version.outputs.new-release-version }}
|
||||||
RELEASE_TAG: ${{ needs.get-next-version.outputs.new-release-git-tag }}
|
RELEASE_TAG: ${{ needs.get-next-version.outputs.new-release-git-tag }}
|
||||||
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: build
|
|
||||||
steps:
|
|
||||||
- uses: thedoctor0/zip-release@0.7.6
|
- uses: thedoctor0/zip-release@0.7.6
|
||||||
with:
|
with:
|
||||||
type: zip
|
type: zip
|
||||||
|
|||||||
Reference in New Issue
Block a user