-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.91 KB
/
dotnet-desktop.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
bump_version_tag:
name: Bump version and push tag
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.create_tag.outputs.new_tag }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Execute action anothrNick/github-tag-action
id: create_tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
build:
needs: bump_version_tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish and zip
run: |
mkdir publish
dotnet publish SpriteCombiner/SpriteCombiner.csproj -c Release -r win-x64 --no-restore -p:PublishReadyToRun=false -p:PublishSingleFile=true --self-contained true -o publish/headless
cp README.md publish
cd publish
zip -r SpriteCombiner *
mv SpriteCombiner.zip ../
- name: Upload archive as release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GH_PACKAGES_TOKEN }}
tag: ${{needs.bump_version_tag.outputs.new_tag}}
artifacts: 'SpriteCombiner.zip'
prerelease: false
- uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: SpriteCombiner
ITCH_USER: nibblebit
PACKAGE: 'SpriteCombiner.zip'
VERSION: ${{needs.bump_version_tag.outputs.new_tag}}