mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Updated github actions, fix for new release steps
This commit is contained in:
+11
-21
@@ -154,7 +154,7 @@ jobs:
|
|||||||
cat dist/versions.env
|
cat dist/versions.env
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: versions.env
|
name: versions.env
|
||||||
path: dist/
|
path: dist/
|
||||||
@@ -179,41 +179,29 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
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
|
- name: Checkout Repo
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: source
|
path: source
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
sparse-checkout: 'README.md'
|
sparse-checkout: 'README.md'
|
||||||
- name: Create latest pre-release
|
- name: Create latest pre-release
|
||||||
if: github.ref == 'refs/heads/master'
|
if: github.ref == 'refs/heads/master'
|
||||||
|
working-directory: source
|
||||||
run: |
|
run: |
|
||||||
gh release delete latest --cleanup-tag || true
|
gh release delete latest --cleanup-tag || true
|
||||||
git tag -d latest || true
|
git tag -d latest || true
|
||||||
git push --delete origin refs/tags/latest || true
|
git push --delete origin refs/tags/latest || true
|
||||||
git tag latest
|
git tag latest
|
||||||
git push --force origin refs/tags/latest
|
git push --force origin refs/tags/latest
|
||||||
gh release create latest dist/* \
|
gh release create latest ../dist/* \
|
||||||
--generate-notes \
|
--generate-notes \
|
||||||
--title "Latest (unstable)" \
|
--title "Latest (unstable)" \
|
||||||
--verify-tag \
|
--verify-tag \
|
||||||
@@ -223,7 +211,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload to tagged release
|
- name: Upload to tagged release
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
working-directory: source
|
||||||
run: |
|
run: |
|
||||||
gh release upload "$GITHUB_REF_NAME" dist/* --clobber
|
exit 0
|
||||||
|
gh release upload "$GITHUB_REF_NAME" ../dist/* --clobber
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout source
|
- name: Checkout source
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download versions.env
|
- name: Download versions.env
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: versions.env
|
name: versions.env
|
||||||
path: artifacts
|
path: artifacts
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
JA2Application=$JA2Application
|
JA2Application=$JA2Application
|
||||||
" >> $GITHUB_ENV
|
" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: microsoft/setup-msbuild@v1.1
|
- uses: microsoft/setup-msbuild@v2
|
||||||
with:
|
with:
|
||||||
msbuild-architecture: x86
|
msbuild-architecture: x86
|
||||||
- uses: ilammy/msvc-dev-cmd@v1
|
- uses: ilammy/msvc-dev-cmd@v1
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
find build/
|
find build/
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_${{ matrix.application }}
|
name: ${{ inputs.language }}_${{ matrix.application }}
|
||||||
path: build/*.exe
|
path: build/*.exe
|
||||||
@@ -100,7 +100,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download versions.env
|
- name: Download versions.env
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: versions.env
|
name: versions.env
|
||||||
path: artifacts
|
path: artifacts
|
||||||
@@ -109,7 +109,7 @@ jobs:
|
|||||||
run: cat artifacts/versions.env >> $GITHUB_ENV
|
run: cat artifacts/versions.env >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Checkout gamedir
|
- name: Checkout gamedir
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.GAMEDIR_REPOSITORY }}
|
repository: ${{ env.GAMEDIR_REPOSITORY }}
|
||||||
ref: ${{ env.GAMEDIR_COMMIT_SHA }}
|
ref: ${{ env.GAMEDIR_COMMIT_SHA }}
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Checkout gamedir-languages
|
- name: Checkout gamedir-languages
|
||||||
if: inputs.language != 'English'
|
if: inputs.language != 'English'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: ${{ env.GAMEDIR_LANGUAGES_REPOSITORY }}
|
repository: ${{ env.GAMEDIR_LANGUAGES_REPOSITORY }}
|
||||||
ref: ${{ env.GAMEDIR_LANGUAGES_COMMIT_SHA }}
|
ref: ${{ env.GAMEDIR_LANGUAGES_COMMIT_SHA }}
|
||||||
@@ -131,25 +131,25 @@ jobs:
|
|||||||
cp -a gamedir-languages/${{ inputs.language }}_Version/* gamedir/
|
cp -a gamedir-languages/${{ inputs.language }}_Version/* gamedir/
|
||||||
|
|
||||||
- name: Download ja2
|
- name: Download ja2
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_ja2
|
name: ${{ inputs.language }}_ja2
|
||||||
path: artifacts/ja2
|
path: artifacts/ja2
|
||||||
|
|
||||||
- name: Download ja2mapeditor
|
- name: Download ja2mapeditor
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_ja2mapeditor
|
name: ${{ inputs.language }}_ja2mapeditor
|
||||||
path: artifacts/ja2mapeditor
|
path: artifacts/ja2mapeditor
|
||||||
|
|
||||||
- name: Download ja2ub
|
- name: Download ja2ub
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_ja2ub
|
name: ${{ inputs.language }}_ja2ub
|
||||||
path: artifacts/ja2ub
|
path: artifacts/ja2ub
|
||||||
|
|
||||||
- name: Download ja2ubmapeditor
|
- name: Download ja2ubmapeditor
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_ja2ubmapeditor
|
name: ${{ inputs.language }}_ja2ubmapeditor
|
||||||
path: artifacts/ja2ubmapeditor
|
path: artifacts/ja2ubmapeditor
|
||||||
@@ -199,7 +199,8 @@ jobs:
|
|||||||
7z a -bb -xr'!.*' "../dist/${DIST_NAME}.7z" .
|
7z a -bb -xr'!.*' "../dist/${DIST_NAME}.7z" .
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.language }}_release
|
name: ${{ inputs.language }}_release
|
||||||
path: dist/
|
path: dist/
|
||||||
|
compression-level: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user