Skip to content

Pass variable to sub task #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/test-and-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ jobs:
name: Package SPFx solution
runs-on: ubuntu-latest
needs: test
outputs:
tag-name: ${{ steps.set-tag-name.outputs.tag-name }}
if: ${{ github.event_name == 'push' }}
steps:
- name: Check out git repository
Expand All @@ -73,15 +75,17 @@ jobs:
uses: zoexx/github-action-json-file-properties@release
with:
file_path: config/package-solution.json
prop_path: solution.version

- name: Tag Repo
run: |
git tag -f v${{ steps.json_properties.outputs.solution.version }}
git tag -f v${{ steps.json_properties.outputs.value }}
git push --tags --force

- name: Set Variable value
id: set-tag-name
run: |
echo "TAG_NAME=${{ steps.json_properties.outputs.solution.version }}" >> $GITHUB_OUTPUT
echo "tag-name=${{ steps.json_properties.outputs.value }}" >> $GITHUB_OUTPUT

- name: Install Node.js v${{ env.NODE_VERSION }}, and NPM
uses: actions/setup-node@v4
Expand Down Expand Up @@ -111,7 +115,7 @@ jobs:
# env:
# TAG_NAME: ${{needs.package.outputs.TAG_NAME }}
with:
tag_name: ${{ needs.package.outputs.TAG_NAME }}
tag_name: ${{ needs.package.outputs.tag-name }}
artifact_name: sp-pkg
# name: Release SPFx solution
# runs-on: ubuntu-latest
Expand Down
Loading