Skip to content

Commit

Permalink
Remove tag action
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Elverkilde committed Mar 3, 2021
1 parent d3a0186 commit 8a1deaa
Showing 1 changed file with 4 additions and 25 deletions.
29 changes: 4 additions & 25 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,31 @@ on:
branches: [ master ]

jobs:
prepare-release:
name: Prepare release
create-release:
name: Create Release
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup git
run: |
git config user.email "[email protected]"
git config user.name "Pusher CI"
git fetch
git checkout ${{ github.event.pull_request.head.ref }}
- name: Prepare package
run: |
export NEW_VERSION=$(grep "<Version>.*</Version>" Root.Build.props | cut -d'>' -f 2 | cut -d'<' -f 1)
echo "VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Tag release
run: git tag ${{ env.VERSION }}
- name: Push
run: git push --tags

create-release:
needs: prepare-release
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Prepare description
run: |
csplit -s CHANGELOG.md "/##/" {1}
cat xx01 > CHANGELOG.tmp
- name: Prepare tag
run: |
export REF=${{ github.ref }}
export TAG=${REF##*/}
export TAG=$(head -1 CHANGELOG.tmp | cut -d' ' -f2)
echo "TAG=$TAG" >> $GITHUB_ENV
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAG }}
release_name: Release ${{ env.TAG }}
release_name: ${{ env.TAG }}
body_path: CHANGELOG.tmp
draft: false
prerelease: false

0 comments on commit 8a1deaa

Please sign in to comment.