Skip to content

Commit

Permalink
Merge pull request #3933 from Gigas002/gh-actions-add-src-artifact-up…
Browse files Browse the repository at this point in the history
…load

Implement github action to produce source code archive with submodules for release
  • Loading branch information
IvanSavenko committed May 12, 2024
2 parents e0b3866 + a345958 commit 06c84eb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/github.yml
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,34 @@ jobs:
name: ${{ env.VCMI_PACKAGE_FILE_NAME }}
path: |
${{ env.ANDROID_APK_PATH }}
deploy-src:
if: always() && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build Number
run: |
source '${{github.workspace}}/CI/get_package_name.sh'
echo VCMI_PACKAGE_FILE_NAME="$VCMI_PACKAGE_FILE_NAME" >> $GITHUB_ENV
- name: Create source code archive (including submodules)
run: |
git archive HEAD -o "release.tar" --worktree-attributes -v
git submodule update --init --recursive
git submodule --quiet foreach 'cd "$toplevel"; tar -rvf "release.tar" "$sm_path"'
gzip release.tar
- name: Upload source code archive
uses: actions/upload-artifact@v4
with:
name: ${{ env.VCMI_PACKAGE_FILE_NAME }}
path: |
./release.tar.gz

0 comments on commit 06c84eb

Please sign in to comment.