fix(Azure): Set id to lower invariant when querying Azure Table. (#160) #25
Workflow file for this run
This file contains 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*.*.*' | |
jobs: | |
version: | |
runs-on: ubuntu-latest | |
steps: | |
- id: get-version-tag | |
run: | | |
export GITHUB_REF_NAME="${{ github.ref_name }}" | |
export RELEASE_VERSION="${GITHUB_REF_NAME#v}" | |
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_OUTPUT | |
outputs: | |
RELEASE_VERSION: ${{ steps.get-version-tag.outputs.RELEASE_VERSION }} | |
verify: | |
name: Run tests | |
runs-on: ubuntu-latest | |
needs: version | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
global-json-file: global.json | |
- name: Test | |
run: dotnet test --verbosity normal | |
release_zip: | |
if: ${{ github.ref_type == 'tag' }} | |
needs: [version, verify] | |
name: Release BaGetter.zip to GitHub | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
global-json-file: global.json | |
- name: Publish | |
run: | | |
dotnet publish src/BaGetter --configuration Release --output artifacts --property:Version=${{ needs.version.outputs.RELEASE_VERSION }} | |
echo ${{ github.sha }} > artifacts/ReleaseSha.txt | |
7z a -tzip bagetter-${{ needs.version.outputs.RELEASE_VERSION }}.zip ./artifacts/* | |
- name: Generate changelog with git-cliff | |
uses: tj-actions/[email protected] | |
with: | |
args: --latest --strip all | |
output: "CHANGELOG.md" | |
- name: Create release with ncipollo/release-action | |
uses: ncipollo/[email protected] | |
with: | |
bodyFile: "CHANGELOG.md" | |
artifacts: "bagetter-${{ needs.version.outputs.RELEASE_VERSION }}.zip" | |
name: ${{ needs.version.outputs.RELEASE_VERSION }} | |
prerelease: ${{ contains(github.ref_name, '-') }} | |
release_packages: | |
if: ${{ github.ref_type == 'tag' }} | |
needs: [version, verify] | |
name: Release packages to nuget.org | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/[email protected] | |
with: | |
global-json-file: global.json | |
- name: Pack | |
run: | | |
export PackageVersion=${{ needs.version.outputs.RELEASE_VERSION }} | |
export PackageSource=${PackageSource:="https://api.nuget.org/v3/index.json"} | |
echo "PackageSource=${PackageSource}" >> $GITHUB_ENV | |
dotnet pack --configuration Release --output artifacts --property:Version=${{ needs.version.outputs.RELEASE_VERSION }} | |
- name: Push | |
run: dotnet nuget push "*" -s ${PackageSource} -k ${{secrets.NUGET_API_KEY}} | |
working-directory: artifacts | |
release_docker_image: | |
if: ${{ github.ref_type == 'tag' }} | |
needs: [version, verify] | |
name: Release Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Login to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set release version | |
run: echo "PackageVersion=${{ needs.version.outputs.RELEASE_VERSION }}" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
bagetter/bagetter:latest | |
bagetter/bagetter:${{ needs.version.outputs.RELEASE_VERSION }} | |
build-args: | | |
Version=${{ needs.version.outputs.RELEASE_VERSION }} |