Add tenant override capability #3
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: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| suffix: '' | |
| - goos: linux | |
| goarch: arm64 | |
| suffix: '' | |
| - goos: darwin | |
| goarch: amd64 | |
| suffix: '' | |
| - goos: darwin | |
| goarch: arm64 | |
| suffix: '' | |
| - goos: windows | |
| goarch: amd64 | |
| suffix: '.exe' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Get version | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF_NAME:-dev} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Build binary | |
| env: | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| CGO_ENABLED: '0' | |
| run: | | |
| go build -ldflags="-s -w -X main.version=${{ steps.version.outputs.version }}" -o git-credential-azure-cli-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} . | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: git-credential-azure-cli-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: git-credential-azure-cli-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.suffix }} | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Prepare release assets | |
| run: | | |
| mkdir -p release | |
| for dir in artifacts/*/; do | |
| cp "$dir"* release/ | |
| done | |
| ls -la release/ | |
| - name: Create checksums | |
| run: | | |
| cd release | |
| sha256sum * > checksums.txt | |
| cat checksums.txt | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release/* | |
| generate_release_notes: true | |
| draft: true | |
| prerelease: false |