Add translations guide #229
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
| # cSpell:ignore GOARCH GOARM buildx softprops | |
| name: Release | |
| on: | |
| pull_request: {} | |
| release: | |
| types: | |
| - published | |
| jobs: | |
| version: | |
| name: Verify version | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ env.version }} | |
| steps: | |
| - name: Output real version | |
| run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
| - name: Output faked version | |
| if: github.event_name == 'pull_request' | |
| run: echo "version=0.0.0" >> $GITHUB_ENV | |
| create-artifacts: | |
| name: Create Artifacts | |
| needs: version | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - {GOOS: linux, GOARCH: amd64} | |
| - {GOOS: linux, GOARCH: arm, GOARM: 6} | |
| - {GOOS: linux, GOARCH: arm64} | |
| - {GOOS: darwin, GOARCH: amd64} | |
| - {GOOS: darwin, GOARCH: arm64} | |
| - {GOOS: freebsd, GOARCH: amd64} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| - run: make package VERSION='${{ needs.version.outputs.version }}' SUFFIX='-${{ matrix.GOOS }}-${{ matrix.GOARCH }}' | |
| shell: bash | |
| env: | |
| GOOS: ${{ matrix.GOOS }} | |
| GOARCH: ${{ matrix.GOARCH }} | |
| GOARM: ${{ matrix.GOARM }} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: release-artifacts-${{ matrix.GOOS }}-${{ matrix.GOARCH }} | |
| path: build/lane-*.tar.* | |
| if-no-files-found: error | |
| create-containerized-release: | |
| name: Create Containerized Release | |
| needs: | |
| - version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/metadata-action@v5 | |
| id: meta | |
| with: | |
| images: ghcr.io/codereaper/lane | |
| tags: | | |
| type=semver,pattern={{version}},value=v${{ needs.version.outputs.version }} | |
| type=semver,pattern={{major}}.{{minor}},value=v${{ needs.version.outputs.version }} | |
| type=semver,pattern={{major}},value=v${{ needs.version.outputs.version }} | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| - uses: docker/build-push-action@v6 | |
| with: | |
| build-args: VERSION=${{ needs.version.outputs.version }} | |
| context: . | |
| platforms: ${{ github.event_name == 'release' && 'linux/arm64,linux/amd64' || '' }} | |
| push: ${{ github.event_name == 'release' && 'true' || 'false' }} | |
| load: ${{ github.event_name == 'release' && 'false' || 'true' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| upload-artifacts: | |
| name: Create Release | |
| needs: | |
| - version | |
| - create-artifacts | |
| - create-containerized-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: release-artifacts-* | |
| merge-multiple: true | |
| path: artifacts | |
| - name: Display structure of files | |
| run: ls -R -lah | |
| - name: Attach files | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "${{ needs.version.outputs.version }}" | |
| files: artifacts/* |