Merge pull request #579 from adobe/compactNumber #91
Workflow file for this run
This file contains hidden or 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
| name: Publish library | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' # Only trigger on tags that match the pattern 'vX.X.X' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install Dependencies | |
| run: yarn install | |
| - name: Extract Tag | |
| id: extract_tag | |
| run: | | |
| FULL_TAG=${GITHUB_REF#refs/tags/} | |
| VERSION_NUMBER=${FULL_TAG#v} | |
| echo "tag=$VERSION_NUMBER" >> "$GITHUB_ENV" | |
| echo "tag=$VERSION_NUMBER" >> "$GITHUB_OUTPUT" | |
| - name: Update Package Version | |
| run: | | |
| node ./scripts/updateVersions.js $tag | |
| - name: Build | |
| run: yarn build | |
| - name: Configure Yarn Registry | |
| run: yarn config set registry https://registry.npmjs.org/ | |
| - name: Publish Adobe Package | |
| run: yarn workspace @adobe/react-spectrum-charts publish-package | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} | |
| - name: Publish Spectrum Charts Packages | |
| run: | | |
| yarn workspace @spectrum-charts/constants publish-package | |
| yarn workspace @spectrum-charts/themes publish-package | |
| yarn workspace @spectrum-charts/utils publish-package | |
| yarn workspace @spectrum-charts/vega-spec-builder publish-package | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.SPECTRUM_CHARTS_NPM_TOKEN }} | |
| - name: Create Pull Request | |
| uses: peter-evans/create-pull-request@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'Update package version to ${{ steps.extract_tag.outputs.tag }}' | |
| title: 'Update package version to ${{ steps.extract_tag.outputs.tag }}' | |
| body: 'This PR updates the version in package.json to ${{ steps.extract_tag.outputs.tag }}.' | |
| branch: 'release-${{ steps.extract_tag.outputs.tag }}' | |
| base: 'main' |