-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 1.18 KB
/
package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Upload linz-coordsys to packagecloud.io when commit is tagged with version
#
# Use linz-software-repository to push to packagecloud.
# Push based on tags.
# tag #.#.#-#-test goes to dev repository
# tag #.#.#-# goes to test repository. Manual promotion from there to prod repository.
#
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+-[0-9]+*"
jobs:
package:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
distro: [bionic, focal]
env:
PACKAGECLOUD_REPOSITORY: test
steps:
- name: Configure target repository
# If the ref name includes -test then go to the dev repo, else to test.
run: |
if [[ "$GITHUB_REF_NAME" =~ "-test" ]]; then
echo "PACKAGECLOUD_REPOSITORY=dev" >> $GITHUB_ENV;
fi
- uses: actions/[email protected]
- name: Document target repository
run: |
echo "Cloud repo: $PACKAGECLOUD_REPOSITORY"
- uses: linz/linz-software-repository@v14
with:
release: ${{ matrix.distro }}
packagecloud_repository: ${{ env.PACKAGECLOUD_REPOSITORY }}
packagecloud_token: ${{ secrets.LINZCI_PACKAGECLOUD_TOKEN }}