Merge pull request #29 from rajiv/akamai #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
branches: | |
- "main" | |
paths-ignore: | |
- '*.md' | |
- '.github/**' | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, '[skip ci]') == false | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.16 | |
- name: Test | |
run: go test -v ./... | |
- name: Build | |
run: go run . | |
- name: Tag next version | |
id: version | |
run: | | |
tag=$(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=1) | awk -F. -v OFS=. '{$NF++;print}') | |
echo "::set-output name=tag::$tag" | |
echo Adding tag $tag | |
git tag $tag | |
git push origin $tag | |
- name: Release notes | |
run: | | |
git log $(git describe --abbrev=0 --tags $(git rev-list --tags --max-count=2) | tail -1)..HEAD --pretty=format:"%h - %an: %s" > release-notes.txt | |
cat release-notes.txt | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: List of Trust Lists ${{ steps.version.outputs.tag }} | |
body_path: release-notes.txt | |
tag_name: ${{ steps.version.outputs.tag }} | |
files: | | |
ltl.yaml | |
ltl.json | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |