Skip to content

Commit

Permalink
fix(ops): uses outputs instead of env
Browse files Browse the repository at this point in the history
  • Loading branch information
Courtcircuits committed Aug 2, 2024
1 parent d91e4c0 commit 70ddaf8
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
Expand All @@ -32,30 +34,23 @@ jobs:
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Compute release version
id: get-tag
run: |
VERSION_SPACES=$(npx semantic-release --dryRun | grep -oP 'Published release \K.*? ')
VERSION="${VERSION_SPACES// /}"
echo "The version is $VERSION"
echo "::set-output name=tag::$VERSION"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
get_tag:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set output
id: vars
run: echo "tag=$GITHUB_REF" | sed s/"refs\/tags\/v/"/g >> $GITHUB_OUTPUT
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.tag }}
run: |
echo $RELEASE_VERSION
echo ${{ steps.vars.outputs.tag }}
deploy:
name: deploy_project
runs-on: ubuntu-latest
needs: get_tag
needs: release
env:
TAG: ${{ needs.get_tag.outputs.tag }}
TAG: ${{ needs.release.outputs.tag }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
Expand Down

0 comments on commit 70ddaf8

Please sign in to comment.