Skip to content

Commit

Permalink
CI release
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotak committed Dec 12, 2020
1 parent c8d7db8 commit 4389b26
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
pull_request:
branches:
- "*"
schedule:
- cron: "0 8 1 * *"

jobs:
platformio-build:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: release

on:
push:
tags:
- "v*"

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Prepare
id: prepare
run: |
git fetch --prune --unshallow --tags -f
VERSION=$(git tag --points-at HEAD)
VERSION=${VERSION//v}
echo "## :bookmark_tabs: Changes" >>"CHANGELOG.md"
git log --pretty=format:"- %s %H%n" $(git describe --abbrev=0 --tags $(git describe --tags --abbrev=0)^)...$(git describe --tags --abbrev=0) >>"CHANGELOG.md"
echo ::set-output name=version::${VERSION}
- name: Create Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.prepare.outputs.version }}
body_path: CHANGELOG.md
draft: false
prerelease: false

0 comments on commit 4389b26

Please sign in to comment.