Fix git describe --tags not working in CI

This commit is contained in:
gsemaj 2022-04-07 09:37:05 -04:00
parent 86576d48f6
commit b683152fbf

View File

@ -23,9 +23,10 @@ jobs:
- name: Set environment
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
shell: bash
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Install dependencies
run: sudo apt install clang cmake snap -y && sudo snap install powershell --classic
- name: Check compilation
@ -61,9 +62,10 @@ jobs:
- name: Set environment
run: $s = $env:GITHUB_SHA.subString(0, 7); echo "SHORT_SHA=$s" >> $env:GITHUB_ENV
shell: pwsh
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Check compilation
run: |
$versions = "104", "728", "1013"
@ -116,15 +118,20 @@ jobs:
BOT_SSH_KEY: ${{ secrets.BOT_SSH_KEY }}
ENDPOINT: ${{ secrets.ENDPOINT }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- run: mkdir ${{ github.sha }}
- uses: actions/download-artifact@v3
with:
path: ${{ github.sha }}
- name: Prepare artifacts
- name: Upload artifacts
shell: bash
run: |
sudo apt install zip -y
cd ${{ github.sha }}
ARTDIR=$(git describe --tags)
cd $ARTDIR
for build in *; do
cd $build
zip -r ../$build.zip *
@ -132,9 +139,6 @@ jobs:
rm -r $build
done
cd ..
- name: Upload artifacts
shell: bash
run: |
umask 077
printf %s "$BOT_SSH_KEY" > cdn_key
scp -i cdn_key -o StrictHostKeyChecking=no -r ${{ github.sha }} $ENDPOINT
scp -i cdn_key -o StrictHostKeyChecking=no -r $ARTDIR $ENDPOINT