forked from mitre/mitre-saf
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.1 KB
/
VERSION.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
name: Generate VERSION.md
on:
release:
types: [published]
jobs:
test:
name: Generate VERSION.md
runs-on: ubuntu-latest
steps:
- name: Checkout mitre-saf
uses: actions/checkout@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Get information for VERSION.md
run: |
git pull origin master
echo "**Release:** " > VERSION.md
git describe --tags $(git rev-list --tags --max-count=1) >> VERSION.md
git describe --tags $(git rev-list --tags --max-count=1) > VERSION
echo "<br><br>**Date:** " >> VERSION.md
git show -s --format=%ci $(git rev-list --tags --max-count=1) >> VERSION.md
echo "<br><br>**Commit:** " >> VERSION.md
git rev-list --tags --max-count=1 >> VERSION.md
- name: Commit and push changes to VERSION.md
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: "master"
commit-message: "Publish version information"
force-add: "true"
env:
CI: true