Add download prop to Button and Link to support file downloads. (#325) #172
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-on-version-change | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| # Allows GitHub Actions to generate OIDC token. | |
| id-token: write | |
| contents: read | |
| jobs: | |
| check-version-change: | |
| name: check-version-change | |
| runs-on: ubuntu-latest | |
| outputs: | |
| did-version-change: ${{ steps.check.outputs.changed }} | |
| new-version: ${{ steps.check.outputs.version }} | |
| type: ${{ steps.check.outputs.type }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v2 | |
| # Determine if version has changed | |
| - name: Check version changes | |
| uses: EndBug/version-check@v2 | |
| with: | |
| diff-search: true | |
| id: check | |
| publish-to-npm: | |
| name: publish-to-npm | |
| runs-on: ubuntu-latest | |
| needs: [check-version-change] | |
| if: needs.check-version-change.outputs.did-version-change == 'true' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| registry-url: "https://registry.npmjs.org" | |
| # Per https://docs.npmjs.com/trusted-publishers, ensure npm 11.5.1 or later is installed. | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm test | |
| - run: npm publish |