v2.3.2-b.13 #131
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: Release | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - published | |
| branch: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| if: contains(github.event.release.target_commitish, 'main') | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - run: | | |
| echo "Release: ${{ github.event.release.target_commitish }}" | |
| - uses: actions/checkout@v3 | |
| with: | |
| ref: main | |
| - name: Echo release info | |
| run: | | |
| echo "Release ${{ github.event.release }}" | |
| echo "Release ${{ github.event.release.tag_name }} published" | |
| echo "Target branch: ${{ github.event.release.target_commitish }}" | |
| echo "Release name: ${{ github.event.release.name }}" | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Prepare dependencies | |
| run: | | |
| echo "Get Node version" | |
| node --version | |
| echo "Install Yarn" | |
| npm install -g [email protected] | |
| echo "Check that we're running latest yarn..." | |
| which yarn | |
| - name: Cache Node.js modules | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS | |
| key: ${{ runner.OS }}-node-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.OS }}-node-${{ matrix.node-version }} | |
| ${{ runner.OS }}- | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Set version in release, repo based on tag | |
| run: | | |
| npm config set git-tag-version false | |
| npm version ${{ github.event.release.tag_name }} -m "beep boop version bump" | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add . | |
| git commit -m "beep boop version bump" | |
| git push | |
| - name: Build the project | |
| run: | | |
| yarn rollup | |
| - name: Upload built source | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/mass-player-card.js | |
| draft: true | |
| prerelease: false | |
| target_commitish: main |