-
-
Notifications
You must be signed in to change notification settings - Fork 13
47 lines (43 loc) · 1.91 KB
/
pack.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: pack
on:
release:
types: [published]
env:
dotnet: 7.0.101
version: 1.11.0
jobs:
pack:
runs-on: ubuntu-latest
name: packing
steps:
- uses: actions/checkout@v2
- name: setup .Net
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet }}
- name: setup nuget config
run: sed 's/GITHUB_TOKEN/${{ secrets.GITHUB_TOKEN }}/g' "${{ github.workspace }}/Package/nuget.config" > nuget.config
- name: create file
run: dotnet pack ToolBox/ToolBox.csproj /p:NuspecFile=${{ github.workspace }}/ToolBox/ToolBox.nuspec -o ${{ github.workspace }}/Package/ -c release
- name: publish nuget on microsoft
run: dotnet nuget push "${{ github.workspace }}/Package/dein.ToolBox.${{ env.version }}.nupkg" -k ${{ secrets.NUGET_TOKEN }} -s "nuget" --skip-duplicate --no-symbols
- name: publish nuget on github
run: dotnet nuget push "${{ github.workspace }}/Package/dein.ToolBox.${{ env.version }}.nupkg" -s "github" --skip-duplicate --no-symbols
tweet:
needs: pack
if: ${{ success() }}
runs-on: ubuntu-latest
steps:
- uses: Eomm/why-don-t-you-tweet@v1
if: ${{ !github.event.repository.private }}
with:
tweet-message: "Toolbox ${{ github.event.release.tag_name }} 🐛🛠 is here 🥳\n
C# .Net Library with utilities like: command line, files, log, platform, shell, system, transform and validation [ Win+Mac+Linux ]\n\n
$ dotnet add package dein.toolbox\n\n
#dotnet #csharp #cli\n\n
https://github.com/deinsoftware/toolbox"
env:
TWITTER_CONSUMER_API_KEY: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
TWITTER_CONSUMER_API_SECRET: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}