Skip to content

Update release.yml #164

Update release.yml

Update release.yml #164

Workflow file for this run

name: Actions CI
on:
push:
branches: [ master, main ]
paths:
- '**'
- '!.editorconfig'
- '!.gitattributes'
- '!.gitignore'
- '!*.md'
- '!LICENSE'
env:
VERBOSITY: 'Minimal'
CONFIGURATION: 'Release'
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
Build:
name: Build on .NET Core ${{ matrix.dotnet }}
runs-on: [ubuntu-latest]
strategy:
matrix:
dotnet: ['8.0.402']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract build and copyright information into variables
id: info
run: |
echo "BUILD=${{ github.run_number }}" >> $GITHUB_ENV
echo "COPYRIGHT=$(echo © $(date -u +%Y) Bytewizer. All rights reserved.)" >> $GITHUB_ENV
- name: Show build information
run: |
echo BUILD=${{ env.BUILD }}
echo COPYRIGHT=${{ env.COPYRIGHT }}
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Echo default env variables
run: |
echo "Home: ${HOME}"
echo "GITHUB_WORKFLOW: ${GITHUB_WORKFLOW}"
echo "GITHUB_ACTIONS: ${GITHUB_ACTIONS}"
echo "GITHUB_ACTOR: ${GITHUB_ACTOR}"
echo "GITHUB_REPOSITORY: ${GITHUB_REPOSITORY}"
echo "GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME}"
echo "GITHUB_WORKSPACE: ${GITHUB_WORKSPACE}"
echo "GITHUB_SHA: ${GITHUB_SHA}"
echo "GITHUB_REF: ${GITHUB_REF}"
- name: Show .NET Core information
run: dotnet --info
- name: Build and test project
run: >-
dotnet test -p:BuildNumber="${{ env.BUILD }}" -p:Copyright="${{ env.COPYRIGHT }}"
--verbosity ${{ env.VERBOSITY }}
--configuration ${{ env.CONFIGURATION }}
--results-directory ./builds/artifacts
--logger:trx
env:
Agent__ApplicationKey: ${{ secrets.AGENT_APPLICATION_KEY }}
Agent__KeyId: ${{ secrets.AGENT_KEY_ID }}
- name: Build and pack project
run: >-
dotnet pack -p:BuildNumber="${{ env.BUILD }}" -p:Copyright="${{ env.COPYRIGHT }}"
--version-suffix preview.${{ env.BUILD }}
--verbosity ${{ env.VERBOSITY }}
--configuration ${{ env.CONFIGURATION }}
--include-symbols
--output ./builds/artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: preview.${{ env.BUILD }}
path: ./builds/artifacts
if-no-files-found: error