Skip to content

Fix wrong branch in workflow #1

Fix wrong branch in workflow

Fix wrong branch in workflow #1

Workflow file for this run

# This workflow will publish the file to CloudFlare
name: .NET publish to CF
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install wasm-tools
run: dotnet workload install wasm-tools
- name: Add build info
run: |
current_date=$(date --iso-8601=minutes)
git_short_hash=$(git rev-parse --short HEAD)
echo $current_date
echo $git_short_hash
sed -i "s/{0}/$current_date/g" wwwroot/index.html
sed -i "s/{1}/$git_short_hash/g" wwwroot/index.html
- name: Publish release
run: dotnet publish -c Release
- name: Remove .wasm file
run: rm bin/Release/net8.0/publish/wwwroot/_framework/*.wasm
- name: Remove .gz file
run: rm bin/Release/net8.0/publish/wwwroot/_framework/*.gz
- name: Upload to pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
command: pages publish bin/Release/net8.0/publish/wwwroot --project-name=dithery