Skip to content

dependencies updated #65

dependencies updated

dependencies updated #65

name: publish to DFinity Internet Computer
on:
pull_request:
push:
branches: [master]
jobs:
publish:
name: build and publish to Dfinity IC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Inject slug/short variables
uses: rlespinasse/github-slug-action@v3.x
- name: "Set master version"
if: ${{ github.ref == 'refs/heads/master'}}
run: echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
env:
APP_VERSION: $(git rev-parse --short "$GITHUB_SHA")
- name: "Set branch version"
if: ${{ github.ref != 'refs/heads/master'}}
run: echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV
env:
APP_VERSION: ${{ env.GITHUB_REF_SLUG }}-$(git rev-parse --short "$GITHUB_SHA")
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
include-prerelease: true
- name: Build with dotnet
run: dotnet build --configuration Release
- name: Publish Website
run: dotnet publish SkyDocs.Blazor -o publish/SkyDocs.Blazor -c Release --version-suffix ${{ env.APP_VERSION }}
- name: Deploy canisters
id: deploy
uses: fleekhq/ic-deploy-action@v2
with:
identity: ${{ secrets.DFX_IDENTITY }}
wallets: ${{ secrets.DFX_WALLETS }}
dfx_params: --no-wallet
- name: Show success message
run: echo success!