graphql fixes #144
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: Build | |
| on: | |
| push: | |
| branches: | |
| - '2.0' | |
| tags: | |
| - '*' | |
| pull_request: | |
| env: | |
| VERSION: dev | |
| AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| SOURCE_DIR: dist | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| os: [ linux,darwin,windows ] | |
| arch: [ amd64,arm64 ] | |
| exclude: | |
| - os: windows | |
| arch: arm64 | |
| env: | |
| GOOS: ${{ matrix.os }} | |
| GOARCH: ${{ matrix.arch }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.25 | |
| - name: build | |
| run: make | |
| - name: test | |
| if: ${{ matrix.os == 'linux' && matrix.arch == 'amd64' }} | |
| run: make test | |
| - name: package | |
| run: make package | |
| - name: Upload production artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }}-${{ matrix.arch }} | |
| path: dist | |
| retention-days: 1 | |
| release-aws-20: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| if: startsWith(github.ref, 'refs/heads/') | |
| strategy: | |
| matrix: | |
| os: [ linux,darwin,windows ] | |
| arch: [ amd64,arm64 ] | |
| exclude: | |
| - os: windows | |
| arch: arm64 | |
| steps: | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }}-${{ matrix.arch }} | |
| path: dist | |
| - name: release aws dev | |
| if: startsWith(github.ref, 'refs/heads/') | |
| uses: jakejarvis/s3-sync-action@master | |
| with: | |
| args: --acl public-read --follow-symlinks --delete | |
| env: | |
| DEST_DIR: wodby-cli/2.0/${{ matrix.os }}/${{ matrix.arch }} | |
| release-aws-tagged: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| strategy: | |
| matrix: | |
| os: [ linux,darwin,windows ] | |
| arch: [ amd64,arm64 ] | |
| exclude: | |
| - os: windows | |
| arch: arm64 | |
| steps: | |
| - name: set version from tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }}-${{ matrix.arch }} | |
| path: dist | |
| - name: release aws tagged | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: jakejarvis/s3-sync-action@master | |
| with: | |
| args: --acl public-read --follow-symlinks --delete | |
| env: | |
| DEST_DIR: wodby-cli/$VERSION/${{ matrix.os }}/${{ matrix.arch }} | |
| create-gh-release: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: get the version from tag | |
| id: version | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
| - name: Create Release | |
| uses: actions/create-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ steps.version.outputs.VERSION }} | |
| release_name: ${{ steps.version.outputs.VERSION }} | |
| draft: true | |
| prerelease: false | |
| upload-gh-release-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: [create-gh-release] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| strategy: | |
| matrix: | |
| os: [ linux,darwin,windows ] | |
| arch: [ amd64,arm64 ] | |
| exclude: | |
| - os: windows | |
| arch: arm64 | |
| steps: | |
| - name: set version from tag | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
| - name: 'Download Artifact' | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }}-${{ matrix.arch }} | |
| path: dist | |
| - name: release github | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: xresloader/upload-to-github-release@v1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| file: dist/wodby-*.tar.gz | |
| overwrite: true | |
| tags: true | |
| draft: false | |
| tag_name: ${{ env.VERSION }} | |
| build-release-image: | |
| runs-on: ubuntu-latest | |
| needs: [build-test] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: docker/setup-qemu-action@v4 | |
| with: | |
| platforms: amd64,arm64 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push 2.0 image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| push: true | |
| build-args: VERSION=2.0 | |
| platforms: linux/amd64,linux/arm64 | |
| tags: wodby/wodby-cli:2.0 |