Skip to content

Commit fdae2ea

Browse files
committed
Use tags in artifact names.
1 parent cc32b88 commit fdae2ea

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/cmake-build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,27 @@ jobs:
9090
- name: prepare artifacts
9191
shell: bash
9292
run: |
93-
mkdir artifacts
93+
mkdir -p artifacts/bin
9494
cp -v build/shared/src/Debug/*.dll \
9595
build/shared/examples/Debug/*.exe \
96+
artifacts/bin
97+
mkdir artifacts/include
98+
cp -vR src/*.h artifacts/include
99+
cp -v README.md \
100+
COPYING \
101+
AUTHORS \
102+
ChangeLog \
103+
doc \
96104
artifacts/
105+
- name: set env
106+
run: echo "ADFLIB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
107+
- name: Test
108+
run: |
109+
echo $ADFLIB_TAG
110+
echo ${{ env.ADFLIB_TAG }}
97111
- uses: actions/upload-artifact@v3
98112
with:
99-
name: adflib-windows
113+
name: adflib-${{ env.ADFLIB_TAG }}-windows
100114
path: |
101115
artifacts/
102116
# - name: test command-line utils

.github/workflows/deb-build.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ jobs:
2828
cut -d' ' -f 3 | cut -d':' -f 1 | xargs dpkg -L
2929
- name: test installed command-line utils
3030
run: ./examples/tests/test-all-examples.sh /usr/bin
31-
#https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
31+
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
3232
- name: copy artifacts
3333
run:
3434
mkdir -v artifacts ;
3535
cp -v ../*.deb ../*.ddeb ../*.gz ../*.xz artifacts/
36+
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
37+
- name: set env
38+
run: echo "ADFLIB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
39+
- name: Test
40+
run: |
41+
echo $ADFLIB_TAG
42+
echo ${{ env.ADFLIB_TAG }}
3643
- uses: actions/upload-artifact@v3
3744
with:
38-
name: ubuntu-deb
45+
name: adflib-${{ env.ADFLIB_TAG }}-deb-ubuntu
3946
path: |
4047
artifacts/

0 commit comments

Comments
 (0)