(#151) (#152) (#154) services: udpate versions [pack-all-force] #436
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: .NET CI Build, Test, and Publish | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build_test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
- name: Set up .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '9.x' | |
- name: Run script to identify changed libraries | |
run: | | |
chmod +x ./scripts/identify-changed-libraries.sh | |
./scripts/identify-changed-libraries.sh | |
- name: Build and test libraries | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
run: | | |
chmod +x ./scripts/build-and-test.sh | |
./scripts/build-and-test.sh | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: TestResults | |
path: src/*/TestResults/ | |
publish: | |
if: github.ref == 'refs/heads/dev' | |
needs: build_test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '9.x' | |
- name: Decode and save certificate | |
run: | | |
echo "${{ secrets.CERTIFICATE_BASE64 }}" | base64 --decode > certificate.cer | |
echo "${{ secrets.PRIVATE_KEY_BASE64 }}" | base64 --decode > privatekey.pem | |
- name: Run publish script for all packages | |
env: | |
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} | |
CERTIFICATE_PATH: certificate.cer | |
PRIVATE_KEY_PATH: privatekey.pem | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
run: | | |
chmod +x ./scripts/pack-all.sh | |
./scripts/pack-all.sh |