Skip to content

Commit

Permalink
migrate away from deprecated Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mathisdt committed Feb 27, 2023
1 parent d1beb54 commit a5a3f15
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ jobs:
${{ runner.os }}-maven-
- name: Run Maven
run: TZ=Europe/Berlin xvfb-run mvn clean verify
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: target/*.zip
- name: Collect release metadata
if: github.ref == 'refs/heads/master'
id: collect_release_metadata
Expand All @@ -43,25 +38,13 @@ jobs:
echo "release_timestamp_terse=$(date '+%Y-%m-%d-%H-%M')" >> $GITHUB_ENV
echo "release_hash=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
echo "release_file=$(ls target/hibiscus-watcher-*.zip)" >> $GITHUB_ENV
echo "release_file_short=$(ls target/hibiscus-watcher-*.zip | sed -e 's#^.*/##g')" >> $GITHUB_ENV
- name: Create release
if: github.ref == 'refs/heads/master'
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v1
with:
tag_name: release-${{ env.release_timestamp_terse }}-${{ env.release_hash }}
release_name: Release ${{ env.release_timestamp }}
name: Release ${{ env.release_timestamp }}
body: built from commit ${{ env.release_hash }}
- name: Upload release artifact
if: github.ref == 'refs/heads/master'
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ env.release_file }}
asset_name: ${{ env.release_file_short }}
asset_content_type: application/zip
tag_name: release-${{ env.release_timestamp_terse }}-${{ env.release_hash }}
files: ${{ env.release_file }}
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit a5a3f15

Please sign in to comment.