diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..15a61d6 --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,18 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." diff --git a/.github/workflows/github-actions-push-nuget.yml b/.github/workflows/github-actions-push-nuget.yml new file mode 100644 index 0000000..ccc6997 --- /dev/null +++ b/.github/workflows/github-actions-push-nuget.yml @@ -0,0 +1,49 @@ +name: "Publish to NuGet" + +on: + push: + tags: + - 'v*' + +env: + PROJECT_PATH: 'src' + PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output + NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' + +jobs: + deploy: + name: 'Publish nuget' + runs-on: ubuntu-latest + strategy: + matrix: + dotnet-version: [ '6.x.x' ] + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup dotnet ${{ matrix.dotnet-version }} + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet-version }} + + - name: Display dotnet version + run: dotnet --version + + - name: Restore packages + run: dotnet restore ${{ env.PROJECT_PATH }} + + - name: Build project + run: dotnet build ${{ env.PROJECT_PATH }} --no-restore --configuration Release + + - name: Get Version + id: version + uses: battila7/get-version-action@v2 + + - run: echo ${{ steps.get_version.outputs.version-without-v }} + + - name: Pack project + run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --configuration Release --include-symbols -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} + + - name: Publish package + run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}/*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }} \ No newline at end of file diff --git a/src/FabulousScheduler.Core/FabulousScheduler.Core.csproj b/src/FabulousScheduler.Core/FabulousScheduler.Core.csproj index 9ef5cc1..e1fedb2 100644 --- a/src/FabulousScheduler.Core/FabulousScheduler.Core.csproj +++ b/src/FabulousScheduler.Core/FabulousScheduler.Core.csproj @@ -13,7 +13,6 @@ true 2.1.2 icon.jpeg - true diff --git a/src/FabulousScheduler.Cron/FabulousScheduler.Cron.csproj b/src/FabulousScheduler.Cron/FabulousScheduler.Cron.csproj index b745283..978a97e 100644 --- a/src/FabulousScheduler.Cron/FabulousScheduler.Cron.csproj +++ b/src/FabulousScheduler.Cron/FabulousScheduler.Cron.csproj @@ -13,7 +13,6 @@ true 2.1.2 icon.jpeg - true diff --git a/src/FabulousScheduler.Queue/FabulousScheduler.Queue.csproj b/src/FabulousScheduler.Queue/FabulousScheduler.Queue.csproj index 047ac22..3135279 100644 --- a/src/FabulousScheduler.Queue/FabulousScheduler.Queue.csproj +++ b/src/FabulousScheduler.Queue/FabulousScheduler.Queue.csproj @@ -14,7 +14,6 @@ true 2.1.2 icon.jpeg - true