v0.2.1 #21
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: notelicker build | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - v12 | |
| paths: | |
| - 'package.json' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm ci | |
| - run: npm run lint | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Get Version # Run the script that returns the version from `module.json` | |
| shell: bash | |
| id: get-version | |
| run: echo "release_version=$(node ./.github/workflows/get-version.js)" >> $GITHUB_OUTPUT | |
| - name: Build module.json | |
| run: node ./.github/workflows/build-module-json.js | jq . > module.json | |
| - run: npm ci | |
| - name: Webpack | |
| run: npm run build | |
| - name: Create Release Zip | |
| run: zip -r ./notelicker.zip module.json storage dist templates css lang LICENSE.md # Add folders/files here | |
| - name: Create Release # Create an additional release for this version | |
| id: create_versioned_release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: false # set to false if you do not want to allow updates on existing releases | |
| name: Release ${{ steps.get-version.outputs.release_version }} # Use the version in the name "${{ env.version }}" | |
| draft: false | |
| prerelease: false | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| artifacts: './module.json,./notelicker.zip' # don't forget to rename module zip thing | |
| tag: ${{ steps.get-version.outputs.release_version }} # Use the version as the tag | |
| - name: Discord notification | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_HOOK }} | |
| DISCORD_USERNAME: "Spittle" | |
| uses: Ilshidur/action-discord@0.3.2 | |
| with: | |
| args: 'Note Licker ${{ steps.get-version.outputs.release_version }} has been published by our development Kobolds!' | |
| - name: FoundryVTT AutoPublish | |
| uses: fjogeleit/http-request-action@v1 | |
| continue-on-error: true | |
| with: | |
| url: 'https://api.foundryvtt.com/_api/packages/release_version' | |
| method: 'POST' | |
| customHeaders: '{"Content-Type": "application/json", "Authorization" : "${{ secrets.FOUNDRY_KEY }}"}' | |
| data: '{"dry_run": false, "id" : "notelicker", "release": {"version" : "${{ steps.get-version.outputs.release_version }}", "manifest": "https://github.com/${{ github.repository }}/releases/download/${{ steps.get-version.outputs.release_version }}/module.json", "notes" : "https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md", "compatibility" : {"minimum": "11", "verified": "12", "maximum": "12"} } }' |