Skip to content

Commit

Permalink
try softprops/action-gh-release@v2
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Jeandemange <damien.jeandemange@artelys.com>
  • Loading branch information
jeandemanged committed Nov 6, 2024
1 parent 733c4bc commit f2f4cc2
Showing 1 changed file with 9 additions and 26 deletions.
35 changes: 9 additions & 26 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,10 @@ jobs:
- name: Package with Maven
run: ./mvnw --batch-mode package

- name: Get Maven version
run: echo "MAVEN_PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: Upload release package
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./metrix-distribution/target/itools-metrix.zip
asset_name: itools-metrix-${{ env.MAVEN_PROJECT_VERSION }}.zip
asset_content_type: application/zip
files: ./metrix-distribution/target/itools-metrix.zip

cpp_ubuntu:
name: Package C++ Ubuntu
Expand Down Expand Up @@ -88,14 +80,9 @@ jobs:
echo "archive_path=$ARCHIVE_PATH" >> "$GITHUB_OUTPUT"
- name: Upload release package
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.metrix-install.outputs.archive_path }}.zip
asset_name: ${{ steps.metrix-install.outputs.archive_name }}.zip
asset_content_type: application/zip
files: ${{ steps.metrix-install.outputs.archive_path }}.zip

cpp_windows:
name: Package C++ Windows
Expand Down Expand Up @@ -146,21 +133,17 @@ jobs:
run: |
$env:ARCHIVE_NAME = "metrix-simulator-windows"
$env:ARCHIVE_PATH = "$env:GITHUB_WORKSPACE\$env:ARCHIVE_NAME"
cd $env:GITHUB_WORKSPACE/metrix-simulator/build/install
Compress-Archive -Path bin,etc -Destination $env:ARCHIVE_PATH
$env:ARCHIVE_PATH = $env:ARCHIVE_PATH -replace '\\','/'
echo "archive_name=$env:ARCHIVE_NAME"
echo "archive_path=$env:ARCHIVE_PATH"
cd $env:GITHUB_WORKSPACE/metrix-simulator/build/install
Compress-Archive -Path bin,etc -Destination $env:ARCHIVE_PATH
cd $env:GITHUB_WORKSPACE
dir
echo "archive_name=$env:ARCHIVE_NAME" >> "$env:GITHUB_OUTPUT"
echo "archive_path=$env:ARCHIVE_PATH" >> "$env:GITHUB_OUTPUT"
- name: Upload release package
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.metrix-install.outputs.archive_path }}.zip
asset_name: ${{ steps.metrix-install.outputs.archive_name }}.zip
asset_content_type: application/zip
files: ${{ steps.metrix-install.outputs.archive_path }}.zip

0 comments on commit f2f4cc2

Please sign in to comment.