From a94cfe5ad3939de074c09fb5a45b2d1dbb6151c2 Mon Sep 17 00:00:00 2001 From: Matthew Griffin Date: Fri, 28 Jun 2024 11:51:02 +0100 Subject: [PATCH] Pass version across jobs --- .github/workflows/publish-package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 5b59c100..ac15de61 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -7,6 +7,8 @@ env: jobs: package: runs-on: ubuntu-latest + outputs: + version: ${{ steps.output.outputs.version}} steps: - name: Check out code uses: actions/checkout@v4 @@ -29,10 +31,15 @@ jobs: name: ${{env.PACKAGE_PREFIX}}${{env.VERSION}} path: ./dist/tech-carbon-estimator/${{env.PACKAGE_PREFIX}}${{env.VERSION}}.tgz overwrite: true #TODO - For testing, remove before final merge + - name: Output version + id: output + run: echo "version=$VERSION" >> "$GITHUB_OUTPUT" publish: runs-on: ubuntu-latest needs: package + env: + VERSION: ${{needs.package.outputs.version}} steps: - name: Set up Node uses: actions/setup-node@v4