Improving ruby extractor (#58) #19
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*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.1" | |
| cache: true | |
| - name: Run tests | |
| run: go test -race -count=1 ./... | |
| build: | |
| needs: test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest # linux/amd64 | |
| goos: linux | |
| goarch: amd64 | |
| - os: ubuntu-24.04-arm # linux/arm64 — native arm64 runner | |
| goos: linux | |
| goarch: arm64 | |
| - os: macos-13 # darwin/amd64 — native Intel runner | |
| goos: darwin | |
| goarch: amd64 | |
| - os: macos-latest # darwin/arm64 — native Apple Silicon | |
| goos: darwin | |
| goarch: arm64 | |
| - os: windows-latest # windows/amd64 | |
| goos: windows | |
| goarch: amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.1" | |
| cache: true | |
| - name: Compute version | |
| id: version | |
| shell: bash | |
| run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" | |
| - name: Build binary | |
| shell: bash | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: 1 | |
| run: | | |
| BINARY="enola-${{ steps.version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}" | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| EXT=".exe" | |
| fi | |
| go build \ | |
| -ldflags "-s -w -X github.com/enola-labs/enola/internal/server.Version=${{ steps.version.outputs.version }}" \ | |
| -o "${BINARY}${EXT}" \ | |
| ./cmd/enola | |
| - name: Create tarball | |
| shell: bash | |
| run: | | |
| BINARY="enola-${{ steps.version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}" | |
| EXT="" | |
| if [ "${{ matrix.goos }}" = "windows" ]; then | |
| EXT=".exe" | |
| fi | |
| tar czf "${BINARY}.tar.gz" "${BINARY}${EXT}" | |
| sha256sum "${BINARY}.tar.gz" > "${BINARY}.sha256" | |
| - name: Upload to release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| enola-${{ steps.version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz | |
| enola-${{ steps.version.outputs.version }}-${{ matrix.goos }}-${{ matrix.goarch }}.sha256 |