Skip to content

Commit

Permalink
Merge pull request #331 from RichDom2185/week11/fix-cd-names
Browse files Browse the repository at this point in the history
Fix continuous deployment names
  • Loading branch information
RichDom2185 authored Oct 27, 2022
2 parents 90a8587 + 7d26fd2 commit 8941884
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ jobs:
- name: Create JAR file
run: ./gradlew shadowJar
- name: Generate tag name from time
id: time
run: echo ::set-output name=NOW::$(echo ${{ github.event.repository.pushed_at }} | sed -e 's/-//g' -e 's/T/-/g' -e 's/.\{4\}$/Z/' -e 's/://g')
id: tagname
run: echo ::set-output name=TAGNAME::$(echo ${{ github.event.repository.pushed_at }} | sed -e 's/^../AR/')
- name: Generate release name from time
id: releasename
run: echo "::set-output name=RELEASENAME::$(date -d @${{ github.event.repository.pushed_at }})"
- name: Create release on GitHub
id: create_release # We need the id to refer to it in the next step
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.time.outputs.NOW }}
release_name: Auto-release ${{ github.event.repository.pushed_at }}
tag_name: ${{ steps.tagname.outputs.TAGNAME }}
release_name: Auto-release ${{ steps.releasename.outputs.RELEASENAME }}
body: 'Auto-created release from branch "${{ github.ref_name }}"'
- name: Upload JAR file to GitHub releases
uses: actions/upload-release-asset@v1
Expand Down

0 comments on commit 8941884

Please sign in to comment.