Add Node version to package.json #6
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Release workflow | |
# | |
# A workflow that runs on commits that are tagged with a version (v*). This will | |
# attempt to build and package the SharePoint Framework package, and then create | |
# a draft GitHub release. The package will be attached to the release. | |
### | |
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
setup: | |
name: Get package configuration | |
runs-on: ubuntu-latest | |
outputs: | |
package: ${{ steps.set-package.outputs.package }} | |
zipped-package: ${{ steps.set-zipped-package.outputs.zipped-package }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get package-solution.json | |
id: package-solution-json | |
run: | | |
echo "config<<EOF" >> $GITHUB_OUTPUT | |
cat ./config/package-solution.json >> $GITHUB_OUTPUT | |
echo "EOF" >> $GITHUB_OUTPUT | |
- name: Output zipped-package | |
id: set-zipped-package | |
run: | | |
echo "zipped-package=${{ fromJson(steps.package-solution-json.outputs.config).paths.zippedPackage }}" >> $GITHUB_OUTPUT | |
- name: Output package | |
id: set-package | |
run: | | |
filepath="${{ steps.set-zipped-package.outputs.zipped-package }}" | |
filename=${filepath##*/} | |
echo "package=$filename" >> $GITHUB_OUTPUT | |
build: | |
name: Release build | |
needs: setup | |
uses: ./.github/workflows/build-package.yml | |
with: | |
zipped-package: ${{ needs.setup.outputs.zipped-package }} | |
release: | |
name: Create GitHub release | |
runs-on: ubuntu-latest | |
needs: [setup, build] | |
steps: | |
- name: Download package | |
uses: actions/download-artifact@v4 | |
with: | |
name: package | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: ${{ needs.setup.outputs.package }} | |
prerelease: true |