forked from aristanetworks/ansible-cvp
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (34 loc) · 1.16 KB
/
tag-management.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
37
38
39
40
---
name: "Tag & Release management"
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
sed -i 's/version: 0\.0\.0/version: '"$(git describe --abbrev=0 --tags | sed 's/v//')"'/' ansible_collections/arista/cvp/galaxy.yml
make collection-build
- name: Upload Collection Package to GH Action
uses: actions/upload-artifact@v2
with:
name: ansible-collection-package
path: |
./*.tar.gz
# - name: Release on Github
# uses: softprops/action-gh-release@v1
# with:
# files: '*.tar.gz'
# - name: Publish Collection to galaxy
# uses: artis3n/ansible_galaxy_collection@v2
# with:
# api_key: '${{ secrets.GALAXY_API_KEY }}'
# collection_dir: 'ansible_collections/arista/cvp/'
# build: false