Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 11 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ jobs:
cat dist/versions.env

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: versions.env
path: dist/
Expand All @@ -179,41 +179,29 @@ jobs:

steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifacts
path: dist
pattern: \*_release
merge-multiple: true

- name: Move release archives to dist/
shell: bash
run: |
set -eux
mkdir dist/
mv artifacts/*_release/* dist/

- name: Delete Latest Release and Tag
if: github.ref == 'refs/heads/master'
uses: dev-drprasad/delete-tag-and-release@v1.0
with:
delete_release: true
tag_name: "latest"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Repo
if: github.ref == 'refs/heads/master'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source
fetch-depth: 1
sparse-checkout: 'README.md'
- name: Create latest pre-release
if: github.ref == 'refs/heads/master'
working-directory: source
run: |
gh release delete latest --cleanup-tag || true
git tag -d latest || true
git push --delete origin refs/tags/latest || true
git tag latest
git push --force origin refs/tags/latest
gh release create latest dist/* \
gh release create latest ../dist/* \
--generate-notes \
--title "Latest (unstable)" \
--verify-tag \
Expand All @@ -223,7 +211,9 @@ jobs:

- name: Upload to tagged release
if: startsWith(github.ref, 'refs/tags/v')
working-directory: source
run: |
gh release upload "$GITHUB_REF_NAME" dist/* --clobber
exit 0
gh release upload "$GITHUB_REF_NAME" ../dist/* --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 13 additions & 12 deletions .github/workflows/build_language.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:

steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download versions.env
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: versions.env
path: artifacts
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
JA2Application=$JA2Application
" >> $GITHUB_ENV

- uses: microsoft/setup-msbuild@v1.1
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x86
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -87,7 +87,7 @@ jobs:
find build/

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.language }}_${{ matrix.application }}
path: build/*.exe
Expand All @@ -100,7 +100,7 @@ jobs:

steps:
- name: Download versions.env
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: versions.env
path: artifacts
Expand All @@ -109,15 +109,15 @@ jobs:
run: cat artifacts/versions.env >> $GITHUB_ENV

- name: Checkout gamedir
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ env.GAMEDIR_REPOSITORY }}
ref: ${{ env.GAMEDIR_COMMIT_SHA }}
path: gamedir

- name: Checkout gamedir-languages
if: inputs.language != 'English'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ env.GAMEDIR_LANGUAGES_REPOSITORY }}
ref: ${{ env.GAMEDIR_LANGUAGES_COMMIT_SHA }}
Expand All @@ -131,25 +131,25 @@ jobs:
cp -a gamedir-languages/${{ inputs.language }}_Version/* gamedir/

- name: Download ja2
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.language }}_ja2
path: artifacts/ja2

- name: Download ja2mapeditor
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.language }}_ja2mapeditor
path: artifacts/ja2mapeditor

- name: Download ja2ub
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.language }}_ja2ub
path: artifacts/ja2ub

- name: Download ja2ubmapeditor
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.language }}_ja2ubmapeditor
path: artifacts/ja2ubmapeditor
Expand Down Expand Up @@ -199,7 +199,8 @@ jobs:
7z a -bb -xr'!.*' "../dist/${DIST_NAME}.7z" .

- name: Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.language }}_release
path: dist/
compression-level: 0