|  | 
|  | 1 | +name: Releases | 
|  | 2 | + | 
|  | 3 | +on:  | 
|  | 4 | + push: | 
|  | 5 | + tags: | 
|  | 6 | + - 'v*' | 
|  | 7 | + | 
|  | 8 | +jobs: | 
|  | 9 | + build: | 
|  | 10 | + runs-on: ubuntu-latest | 
|  | 11 | + steps: | 
|  | 12 | + - name: Checkout code | 
|  | 13 | + uses: actions/checkout@v2.3.4 | 
|  | 14 | + with: | 
|  | 15 | + ref: ${{ github.ref }} | 
|  | 16 | + - name: Pick Release Version from git tag | 
|  | 17 | + id: version | 
|  | 18 | + run: | | 
|  | 19 | + echo "::set-output name=version::${GITHUB_REF#refs/*/}" | 
|  | 20 | + - name: Debug Release Version | 
|  | 21 | + run: echo "Extracted this version ${{ steps.version.outputs.version }}" | 
|  | 22 | + - name: Pick Changelog from git tag | 
|  | 23 | + id: changelog | 
|  | 24 | + run: |  | 
|  | 25 | + OUTPUT=$(git tag -l --format='%(contents:body)' ${GITHUB_REF#refs/*/}) | 
|  | 26 | + OUTPUT="${OUTPUT//'%'/'%25'}" | 
|  | 27 | + OUTPUT="${OUTPUT//$'\n'/'%0A'}" | 
|  | 28 | + OUTPUT="${OUTPUT//$'\r'/'%0D'}" | 
|  | 29 | + echo "::set-output name=body::$OUTPUT" | 
|  | 30 | + - name: Debug Changelog | 
|  | 31 | + run: echo "Extracted this Changelog \n ${{ steps.changelog.outputs.body }}" | 
|  | 32 | + - uses: ncipollo/release-action@v1 | 
|  | 33 | + with: | 
|  | 34 | + body: ${{ steps.changelog.outputs.body }} | 
|  | 35 | + token: ${{ secrets.GITHUB_TOKEN }} | 
|  | 36 | + name: ${{ steps.version.outputs.version }} | 
|  | 37 | + tag: ${{ steps.version.outputs.version }} | 
|  | 38 | + allowUpdates: true | 
0 commit comments