Build on every pull request, and fix the patch that proved why (#24) #12
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: | |
| push: | |
| tags: ['v*'] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| plugin: | |
| name: calls plugin | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: pin | |
| run: grep -E '^[A-Z_]+=' upstream.env >> "$GITHUB_OUTPUT" | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20' } | |
| - uses: actions/setup-go@v5 | |
| with: { go-version: '1.26' } | |
| - run: ./scripts/build-calls.sh dist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: calls-plugin | |
| path: dist/* | |
| - if: startsWith(github.ref, 'refs/tags/') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: dist/* | |
| body: | | |
| Built from upstream calls `${{ steps.pin.outputs.CALLS_TAG }}`. | |
| Set `MM_CALLS_GROUP_CALLS_ALLOWED=true` on the server, then upload the | |
| bundle in System Console > Plugins > Plugin Management. | |
| Full instructions: https://mattermore.dev/install | |
| Verify the download: | |
| ``` | |
| sha256sum -c mattermore-calls-${{ steps.pin.outputs.CALLS_VERSION }}.tar.gz.sha256 | |
| ``` | |
| image: | |
| name: server image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { node-version: '20' } | |
| - uses: actions/setup-go@v5 | |
| with: { go-version: '1.26' } | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build | |
| env: | |
| CONTAINER_ENGINE: docker | |
| run: ./scripts/build-image.sh ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| - name: Push | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| docker tag ghcr.io/${{ github.repository }}:${{ github.ref_name }} \ | |
| ghcr.io/${{ github.repository }}:latest | |
| docker push ghcr.io/${{ github.repository }}:${{ github.ref_name }} | |
| docker push ghcr.io/${{ github.repository }}:latest |