Release #13
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: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: 'Release version' | |
required: true | |
default: '1.0.0-preview1' | |
packageSource: | |
description: 'Package source' | |
required: true | |
default: 'https://api.nuget.org/v3/index.json' | |
env: | |
Version: ${{ github.event.inputs.releaseVersion }} | |
PackageVersion: ${{ github.event.inputs.releaseVersion }} | |
jobs: | |
verify: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Test | |
run: dotnet test --verbosity normal | |
release_zip: | |
needs: verify | |
name: Release BaGetter.zip to GitHub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Publish | |
run: dotnet publish src/BaGetter --configuration Release --output artifacts | |
- name: Upload | |
uses: actions/[email protected] | |
with: | |
name: BaGetter | |
path: artifacts | |
release_packages: | |
needs: verify | |
name: Release packages to nuget.org | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.100 | |
- name: Pack | |
run: dotnet pack --configuration Release --output artifacts | |
- name: Push | |
run: dotnet nuget push "*" -s ${{ github.event.inputs.packageSource }} -k ${{secrets.NUGET_API_KEY}} | |
working-directory: artifacts | |
release_docker_image: | |
needs: verify | |
name: Release Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Log in to Docker Hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: . | |
push: true | |
tags: | | |
bagetter/bagetter:latest | |
bagetter/bagetter:${{ github.event.inputs.releaseVersion }} |