diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 795fc0a..bbaeb52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Release + on: push: - tags: ['[0-9]+.[0-9]+.[0-9]+', '[0-9]+.[0-9]+.[0-9]+-pre[0-9]+'] - paths-ignore: [ 'docs/**' ] + branches: [ main ] permissions: write-all @@ -39,12 +39,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: 8.0.x - - name: Install dotnet workload - run: dotnet workload restore - - name: Restore - run: dotnet restore ${SLN_FILE} - - name: Build - run: dotnet build ${SLN_FILE} -p:Version=${RELEASE_VERSION} -c ${CONFIG} --no-restore - name: Pack run: | find templates -type f -name template.json | xargs sed -i bak "s/PKG_VERSION/${RELEASE_VERSION}/g" diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml deleted file mode 100644 index 40b6df7..0000000 --- a/.github/workflows/templates.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Pack templates -on: - push: - branches: [ main ] - -jobs: - github: - runs-on: ubuntu-latest - environment: 'github' - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.0.x - - name: Pack - run: dotnet pack FSharp.Mobile.Templates.proj --configuration Release --version-suffix "nightly-${GITHUB_RUN_ID}" --property PackageOutputPath=${PWD}/nupkgs - - name: Push - run: | - dotnet nuget add source https://nuget.pkg.github.com/fabulous-dev/index.json --name github - dotnet nuget push "nupkgs/*" --source github --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate - - nuget: - runs-on: ubuntu-latest - environment: 'nuget' - needs: github - steps: - - uses: actions/checkout@v2 - - name: Setup .NET - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 8.0.x - - name: Pack - run: dotnet pack FSharp.Mobile.Templates.proj --configuration Release --property PackageOutputPath=${PWD}/nupkgs - - name: Push - run: dotnet nuget push "nupkgs/*" --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate