Skip to content

Commit

Permalink
fix and improve ci artifact generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler-IN committed Apr 5, 2022
1 parent e5bd987 commit bb202ed
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,19 @@ jobs:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch tag git metadata
run: git fetch --force --update-shallow --depth 1 origin +refs/tags/*:refs/tags/* || echo no tags
- name: Fetch git tag metadata
id: git-tag-metadata
run: |
echo Fetching tags...
git fetch --force --update-shallow --depth 1 origin +refs/tags/*:refs/tags/* || echo No tags.
echo ""
git log --tags --simplify-by-decoration --pretty="format:%cs %d"
echo ""
echo Fetching since $(git log -1 --tags --simplify-by-decoration --pretty="format:%H")...
git fetch --force --update-shallow --shallow-exclude=$(git log -1 --tags --simplify-by-decoration --pretty="format:%H") || echo Failed shallow-exclude fetch.
echo ""
echo Version: $(git describe --always --tags --match v*)
echo "::set-output name=version::$(git describe --always --tags --match v*)"
- name: Check for .NET 6 preinstalled
id: dotnet_check
run: |
Expand All @@ -55,14 +66,12 @@ jobs:
- name: Test
run: dotnet test *.sln --no-build -c Release
- name: Release Template
id: release-template
run: |
mv DistantWorlds2.ModLoader/bin/Release/net472/DistantWorlds2.ModLoader.dll ReleaseTemplate/
mv DW2Net6Win/bin/Release/net6.0-windows/win-x64/publish/DW2Net6Win.exe ReleaseTemplate/
echo "::set-output name=version::$(git describe --tags --match v*)"
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}.${{ steps.release-template.outputs.version }}
name: ${{ github.event.repository.name }}.${{ steps.git-tag-metadata.outputs.version }}
path: ReleaseTemplate/
if-no-files-found: error
8 changes: 6 additions & 2 deletions ReleaseTemplate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,12 @@ These are registry patches used to make it easier to run the game under differen
| `DW2Net6Win-Undo.reg` | This undoes what the other two change such that the normal `DistantWorlds2.exe` is run by Steam/GoG/etc. |


### What about that empty `mods` folder?
### What about that ``.keep` file in the `mods` directory?

This is where you will extract your modifications.
The `mods` directory is where you will extract your modifications.

Extracting this package to your game directory just creates the directory for you.

The `.keep` file is empty, it just holds that directory in place for packaging purposes.

You can safely remove it if you want.
Empty file added ReleaseTemplate/mods/.keep
Empty file.

0 comments on commit bb202ed

Please sign in to comment.