Skip to content

Commit e99b009

Browse files
committed
Atualizado as dependências.
1 parent 95bf996 commit e99b009

62 files changed

Lines changed: 353 additions & 192 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: publish
3+
on:
4+
workflow_dispatch: # Allow running the workflow manually from the GitHub UI
5+
release:
6+
types:
7+
- published # Run the workflow when a new GitHub release is published
8+
9+
env:
10+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
11+
DOTNET_NOLOGO: true
12+
NuGetDirectory: ${{ github.workspace }}/nuget
13+
14+
defaults:
15+
run:
16+
shell: pwsh
17+
18+
jobs:
19+
create_nuget:
20+
runs-on: windows-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer
25+
26+
- name: Setup NuGet
27+
uses: nuget/setup-nuget@v2
28+
29+
- name: Restore NuGet packages
30+
run: nuget restore OpenAC.Net.EscPos.sln
31+
working-directory: src
32+
33+
# Install the .NET SDK indicated in the global.json file
34+
- name: Setup .NET
35+
uses: actions/setup-dotnet@v4
36+
with:
37+
dotnet-version: '9.x'
38+
- run: dotnet msbuild OpenAC.Net.EscPos.sln -property:Configuration=Release -property:platform="Any CPU"
39+
working-directory: src
40+
- run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}
41+
working-directory: src
42+
43+
# Publish the NuGet package as an artifact, so they can be used in the following jobs
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: nuget
47+
if-no-files-found: error
48+
retention-days: 7
49+
path: ${{ env.NuGetDirectory }}/*.nupkg
50+
51+
validate_nuget:
52+
runs-on: ubuntu-latest
53+
needs: [ create_nuget ]
54+
steps:
55+
# Install the .NET SDK indicated in the global.json file
56+
- name: Setup .NET
57+
uses: actions/setup-dotnet@v4
58+
59+
# Download the NuGet package created in the previous job
60+
- uses: actions/download-artifact@v4
61+
with:
62+
name: nuget
63+
path: ${{ env.NuGetDirectory }}
64+
65+
- name: Install nuget validator
66+
run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global
67+
68+
# Validate metadata and content of the NuGet package
69+
# https://www.nuget.org/packages/Meziantou.Framework.NuGetPackageValidation.Tool#readme-body-tab
70+
# If some rules are not applicable, you can disable them
71+
# using the --excluded-rules or --excluded-rule-ids option
72+
- name: Validate package
73+
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")
74+
75+
deploy:
76+
# Publish only when creating a GitHub Release
77+
# https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
78+
# You can update this logic if you want to manage releases differently
79+
if: github.event_name == 'release'
80+
runs-on: ubuntu-latest
81+
needs: [ validate_nuget ]
82+
steps:
83+
# Download the NuGet package created in the previous job
84+
- uses: actions/download-artifact@v4
85+
with:
86+
name: nuget
87+
path: ${{ env.NuGetDirectory }}
88+
89+
# Install the .NET SDK indicated in the global.json file
90+
- name: Setup .NET Core
91+
uses: actions/setup-dotnet@v4
92+
93+
# Publish all NuGet packages to NuGet.org
94+
# Use --skip-duplicate to prevent errors if a package with the same version already exists.
95+
# If you retry a failed workflow, already published packages will be skipped without error.
96+
- name: Publish NuGet package
97+
run: |
98+
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg)) {
99+
dotnet nuget push $file --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
100+
}

nuget.png

66.2 KB
Loading

src/.idea/.idea.OpenAC.Net.EscPos/.idea/.gitignore

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/AndroidProjectSystem.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/aws.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/encodings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/indexLayout.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/.idea/.idea.OpenAC.Net.EscPos/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/OpenAC.Net.EscPos.Demo/OpenAC.Net.EscPos.Demo.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
<PropertyGroup>
44
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net8.0-windows</TargetFramework>
5+
<TargetFramework>net9.0-windows</TargetFramework>
66
<Nullable>enable</Nullable>
77
<UseWindowsForms>true</UseWindowsForms>
88
<ImplicitUsings>enable</ImplicitUsings>
99
<LangVersion>default</LangVersion>
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="NLog" Version="5.3.2" />
14-
<PackageReference Include="NLog.Windows.Forms" Version="5.2.3" />
15-
<PackageReference Include="OpenAC.Net.Devices" Version="1.5.0.1" />
16-
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
13+
<PackageReference Include="NLog" Version="5.5.0" />
14+
<PackageReference Include="NLog.Windows.Forms" Version="5.2.4" />
15+
<PackageReference Include="OpenAC.Net.Devices" Version="1.6.0" />
16+
<PackageReference Include="System.Text.Encoding.CodePages" Version="9.0.5" />
1717
</ItemGroup>
1818

1919
<ItemGroup>

0 commit comments

Comments
 (0)