-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/DaanV2/DaanV2-NBT.Net
- Loading branch information
Showing
5 changed files
with
51 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: 📦 Nuget Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: {} | ||
push: | ||
tags: | ||
- '*' | ||
|
||
concurrency: | ||
group: publish-${{ github.ref }} | ||
|
@@ -13,8 +13,45 @@ env: | |
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
jobs: | ||
update-version: | ||
name: 📝 Update version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag_name: ${{ steps.tag.outputs.tag_name }} | ||
steps: | ||
- name: 📦 Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: 🔍 Get Tag | ||
id: tag | ||
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: 🖊️ Update version in .csproj files | ||
run: | | ||
TAG=${{ steps.tag.outputs.tag_name }} | ||
find . -name '*.csproj' -type f -exec sed -i "s/<Version>.*<\/Version>/<Version>${TAG//v}<\/Version>/g" {} \; | ||
- name: 📋 Commit changes | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add . | ||
git commit -m "auto: Update version to ${{ steps.tag.outputs.tag_name }}" || echo "No changes to commit" | ||
- name: 🚚 Push changes | ||
continue-on-error: true | ||
run: git push | ||
|
||
- name: 🖊️ Job summary | ||
run: | | ||
echo "Tag name: ${{ steps.tag.outputs.tag_name }}" >> $GITHUB_STEP_SUMMARY | ||
build: | ||
name: 🛠️ Build | ||
runs-on: windows-latest | ||
needs: update-version | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
@@ -24,14 +61,15 @@ jobs: | |
steps: | ||
- name: 📦 Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
|
||
- name: 🛠️ Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: | | ||
7.0.x | ||
8.0.x | ||
source-url: https://nuget.pkg.github.com/DaanV2/index.json | ||
- name: 📥 Restore dependencies | ||
run: dotnet restore --verbosity normal | ||
|
@@ -45,8 +83,7 @@ jobs: | |
- name: 📦 Create the package | ||
run: dotnet pack --configuration Release Library | ||
|
||
- name: 🚚 Publish the package to GPR | ||
- name: 🚚 Publish the package to Nuget | ||
run: | | ||
cd ${{ github.workspace }}/Library/bin/Release/ | ||
dotnet nuget push *.nupkg | ||
dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,15 +7,15 @@ | |
<AssemblyName>DaanV2.NBT.Net</AssemblyName> | ||
<RootNamespace>DaanV2.NBT</RootNamespace> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
<Title>DaanV2.UUID.Net</Title> | ||
<Title>DaanV2.NBT.Net</Title> | ||
<Authors>DaanV2</Authors> | ||
<Copyright>[email protected]</Copyright> | ||
<FileVersion>$(VersionPrefix)</FileVersion> | ||
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion> | ||
<Version>2.0.0</Version> | ||
<Version>2.0.3</Version> | ||
<Platforms>AnyCPU;x64;x86</Platforms> | ||
<SignAssembly>False</SignAssembly> | ||
<Description>An NBT library for reading and writing NBT files/data</Description> | ||
<Description>An NBT library for reading and writing NBT files, support Minecraft java and bedrock nbt/data</Description> | ||
<PackageProjectUrl>https://github.com/DaanV2/DaanV2.NBT.Net</PackageProjectUrl> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
|