Skip to content

Commit 9fbd515

Browse files
committed
Try to always create artifacts
1 parent 16ddf82 commit 9fbd515

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/releases.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ jobs:
2626
- name: Get the version
2727
id: get_version
2828
run: |
29-
VERSION=${GITHUB_REF/refs\/tags\//}
29+
if [[ $GITHUB_REF == refs/tags/* ]]; then
30+
VERSION=${GITHUB_REF/refs\/tags\//}
31+
else
32+
VERSION="dev-$(date +'%Y%m%d-%H%M%S')-${GITHUB_SHA::8}"
33+
fi
3034
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3135
echo "Tag version: $VERSION"
3236
@@ -48,12 +52,10 @@ jobs:
4852
cd -
4953
5054
- name: Build all
51-
if: startsWith(github.ref, 'refs/tags/')
5255
run: |
5356
.ci/ci-build.sh "${{ steps.get_version.outputs.VERSION }}"
5457
5558
- name: Package
56-
if: startsWith(github.ref, 'refs/tags/')
5759
run: |
5860
.ci/ci-package.sh "${{ steps.get_version.outputs.VERSION }}"
5961
@@ -73,6 +75,16 @@ jobs:
7375
echo | /tmp/bin/minisign -s /tmp/minisign.key -Sm *.tar.gz *.zip
7476
ls -l dnscrypt-proxy*
7577
78+
- name: Upload artifacts
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: dnscrypt-proxy-${{ steps.get_version.outputs.VERSION }}
82+
path: |
83+
dnscrypt-proxy/*.zip
84+
dnscrypt-proxy/*.tar.gz
85+
retention-days: 30
86+
if-no-files-found: error
87+
7688
- name: Check if release exists
7789
id: check_release
7890
if: startsWith(github.ref, 'refs/tags/')
@@ -122,4 +134,4 @@ jobs:
122134
dnscrypt-proxy/*.zip
123135
dnscrypt-proxy/*.tar.gz
124136
dnscrypt-proxy/*.minisig
125-
dnscrypt-proxy/*.msi
137+
dnscrypt-proxy/*.msi

0 commit comments

Comments
 (0)