fix: specify exact version for delve installation in Dockerfile #20
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: Create Release on Tag | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Get tag name (without v prefix) | |
| id: get_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Get tag name (with v prefix) | |
| id: get_tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Get previous tag | |
| id: previous_tag | |
| run: | | |
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 ${{ steps.get_tag.outputs.TAG }}^ 2>/dev/null || echo "") | |
| echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_OUTPUT | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| if [ -n "${{ steps.previous_tag.outputs.PREVIOUS_TAG }}" ]; then | |
| echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT | |
| git log --pretty=format:"- %s (%h)" ${{ steps.previous_tag.outputs.PREVIOUS_TAG }}..${{ steps.get_tag.outputs.TAG }} >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| else | |
| echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT | |
| git log --pretty=format:"- %s (%h)" ${{ steps.get_tag.outputs.TAG }} >> $GITHUB_OUTPUT | |
| echo "EOF" >> $GITHUB_OUTPUT | |
| fi || echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT && echo "No changes available." >> $GITHUB_OUTPUT && echo "EOF" >> $GITHUB_OUTPUT | |
| - name: Build Docker image for building | |
| uses: docker/build-push-action@v4 | |
| with: | |
| context: . | |
| file: .devcontainer/dev.Dockerfile | |
| load: true | |
| tags: akoflow-builder:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Create releases directory | |
| run: mkdir -p releases/bin | |
| - name: Build all binaries | |
| run: | | |
| docker run --rm -v $(pwd):/app -e VERSION=${{ steps.get_version.outputs.VERSION }} akoflow-builder:latest sh -c "\ | |
| mkdir -p /app/releases/bin && \ | |
| CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /app/releases/bin/akoflow-server_${{ steps.get_version.outputs.VERSION }}_linux_amd64 /app/cmd/server/main.go && \ | |
| CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o /app/releases/bin/akoflow-server_${{ steps.get_version.outputs.VERSION }}_linux_arm64 /app/cmd/server/main.go && \ | |
| CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o /app/releases/bin/akoflow-server_${{ steps.get_version.outputs.VERSION }}_windows_amd64.exe /app/cmd/server/main.go && \ | |
| CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o /app/releases/bin/akoflow-server_${{ steps.get_version.outputs.VERSION }}_darwin_amd64 /app/cmd/server/main.go && \ | |
| CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /app/releases/bin/akoflow-server_${{ steps.get_version.outputs.VERSION }}_darwin_arm64 /app/cmd/server/main.go && \ | |
| CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o /app/releases/bin/akoflow-client_${{ steps.get_version.outputs.VERSION }}_linux_amd64 /app/cmd/client/main.go && \ | |
| CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=aarch64-linux-gnu-gcc go build -o /app/releases/bin/akoflow-client_${{ steps.get_version.outputs.VERSION }}_linux_arm64 /app/cmd/client/main.go && \ | |
| CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o /app/releases/bin/akoflow-client_${{ steps.get_version.outputs.VERSION }}_windows_amd64.exe /app/cmd/client/main.go && \ | |
| CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o /app/releases/bin/akoflow-client_${{ steps.get_version.outputs.VERSION }}_darwin_amd64 /app/cmd/client/main.go && \ | |
| CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /app/releases/bin/akoflow-client_${{ steps.get_version.outputs.VERSION }}_darwin_arm64 /app/cmd/client/main.go" | |
| - name: Create platform archives | |
| run: | | |
| cd releases/bin | |
| # Linux AMD64 | |
| tar -czf ../akoflow_${{ steps.get_version.outputs.VERSION }}_linux_amd64.tar.gz *_linux_amd64 | |
| # Linux ARM64 | |
| tar -czf ../akoflow_${{ steps.get_version.outputs.VERSION }}_linux_arm64.tar.gz *_linux_arm64 | |
| # Windows AMD64 | |
| zip -r ../akoflow_${{ steps.get_version.outputs.VERSION }}_windows_amd64.zip *_windows_amd64.exe | |
| # macOS AMD64 | |
| tar -czf ../akoflow_${{ steps.get_version.outputs.VERSION }}_darwin_amd64.tar.gz *_darwin_amd64 | |
| # macOS ARM64 | |
| tar -czf ../akoflow_${{ steps.get_version.outputs.VERSION }}_darwin_arm64.tar.gz *_darwin_arm64 | |
| cd ../.. | |
| - name: Create checksums | |
| run: | | |
| cd releases/bin | |
| sha256sum * > ../akoflow_${{ steps.get_version.outputs.VERSION }}_checksums.txt | |
| cd ../.. | |
| - name: Create Release | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.get_tag.outputs.TAG }} | |
| name: AkôFlow ${{ steps.get_tag.outputs.TAG }} | |
| body: | | |
| # AkôFlow Release ${{ steps.get_tag.outputs.TAG }} | |
| ## Changes | |
| ${{ steps.changelog.outputs.CHANGELOG }} | |
| ## Installation | |
| ### Client Binaries | |
| - Linux (AMD64): `akoflow-client_${{ steps.get_version.outputs.VERSION }}_linux_amd64` | |
| - Linux (ARM64): `akoflow-client_${{ steps.get_version.outputs.VERSION }}_linux_arm64` | |
| - Windows (AMD64): `akoflow-client_${{ steps.get_version.outputs.VERSION }}_windows_amd64.exe` | |
| - macOS (AMD64): `akoflow-client_${{ steps.get_version.outputs.VERSION }}_darwin_amd64` | |
| - macOS (ARM64): `akoflow-client_${{ steps.get_version.outputs.VERSION }}_darwin_arm64` | |
| ### Server Binaries | |
| - Linux (AMD64): `akoflow-server_${{ steps.get_version.outputs.VERSION }}_linux_amd64` | |
| - Linux (ARM64): `akoflow-server_${{ steps.get_version.outputs.VERSION }}_linux_arm64` | |
| - Windows (AMD64): `akoflow-server_${{ steps.get_version.outputs.VERSION }}_windows_amd64.exe` | |
| - macOS (AMD64): `akoflow-server_${{ steps.get_version.outputs.VERSION }}_darwin_amd64` | |
| - macOS (ARM64): `akoflow-server_${{ steps.get_version.outputs.VERSION }}_darwin_arm64` | |
| Download the appropriate binary for your platform, make it executable, and add it to your PATH. | |
| ### Download Client | |
| For more information, visit [AkôFlow Client documentation](https://github.com/UFFeScience/akoflow/wiki/). | |
| ### Download Server | |
| For more information, visit [AkôFlow Server documentation](https://github.com/UFFeScience/akoflow/wiki/). | |
| ## Documentation | |
| For more information, visit [AkôFlow documentation](https://github.com/UFFeScience/akoflow/wiki/). | |
| draft: false | |
| prerelease: false | |
| files: | | |
| releases/bin/* | |
| releases/*_checksums.txt | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |