build ci #16
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: spa-server release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| env: | |
| REGISTRY: ghcr.io | |
| jobs: | |
| client: | |
| uses: ./.github/workflows/spa-client-build.yml | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to GithubPackages | |
| uses: docker/login-action@v2 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: build and push spa-server | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| #platforms: linux/amd64,linux/arm64 | |
| push: true | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| tags: ${{ env.REGISTRY }}/fornetcode/spa-server:${{github.ref_name}}, ${{ env.REGISTRY }}/fornetcode/spa-server:latest | |
| # - name: build and push spa-server with S3 | |
| # uses: docker/build-push-action@v2 | |
| # with: | |
| # context: "{{defaultContext}}:docker" | |
| # file: S3FS.Dockerfile | |
| # push: true | |
| # cache-from: type=gha | |
| # cache-to: type=gha,mode=max | |
| # tags: ${{ env.REGISTRY }}/fornetcode/spa-server:${{github.event.inputs.version}}-s3 | |
| binFile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: Setup MUSL | |
| run: | | |
| rustup target add x86_64-unknown-linux-musl | |
| sudo apt-get -qq install musl-tools | |
| - name: Build Release Linux | |
| run: make release-linux-server-musl | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ./release/* | |
| name: spa-server-linux-musl | |
| if-no-files-found: error | |
| release: | |
| runs-on: ubuntu-latest | |
| needs: [client, docker, binFile] | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: list artifacts | |
| run: ls -R artifacts | |
| - name: Create Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: "artifacts/**/*" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: true |