Skip to content

Commit

Permalink
release #86
Browse files Browse the repository at this point in the history
  • Loading branch information
yousefvand committed Nov 30, 2024
1 parent 1871a6c commit 7f74cdb
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ jobs:
- name: Package Notepad-- (Windows)
if: matrix.os == 'windows-latest'
run: |
mkdir "${{ github.workspace }}\\output"
Compress-Archive -Path "${{ github.workspace }}\\build\\*" -DestinationPath "${{ github.workspace }}\\output\\Notepad--_windows.zip"
BUILD_DIR="${{ github.workspace }}\\build"
OUTPUT_DIR="${{ github.workspace }}\\output"
mkdir $OUTPUT_DIR
Compress-Archive -Path "$BUILD_DIR\\*" -DestinationPath "$OUTPUT_DIR\\Notepad--_windows.zip"
shell: cmd
- name: Upload Windows Artifact
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v3
Expand All @@ -132,61 +135,46 @@ jobs:
runs-on: ubuntu-latest
needs: build-and-release
steps:
- name: Download Ubuntu Artifact
uses: actions/download-artifact@v3
with:
name: Notepad--_ubuntu
path: artifacts

- name: Download macOS Artifact
uses: actions/download-artifact@v3
with:
name: Notepad--_macos
path: artifacts

- name: Download Windows Artifact
uses: actions/download-artifact@v3
with:
name: Notepad--_windows
path: artifacts
- name: Checkout code
uses: actions/checkout@v4

- name: Generate Tag Name
id: tag_name
run: |
TIMESTAMP=$(date +%Y%m%d%H%M%S)
echo "RELEASE_TAG=release-$TIMESTAMP" >> $GITHUB_ENV
echo "::set-output name=tag_name::release-$TIMESTAMP"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: Notepad-- Release
release_name: "Notepad-- Release"
draft: false
prerelease: false

- name: Upload Ubuntu Artifact to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/Notepad--_ubuntu.tar.gz
asset_path: "${{ github.workspace }}/output/Notepad--_ubuntu.tar.gz"
asset_name: Notepad--_ubuntu.tar.gz
asset_content_type: application/gzip

- name: Upload macOS Artifact to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/Notepad--_macos.zip
asset_path: "${{ github.workspace }}/output/Notepad--_macos.zip"
asset_name: Notepad--_macos.zip
asset_content_type: application/zip

- name: Upload Windows Artifact to Release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/Notepad--_windows.zip
asset_path: "${{ github.workspace }}/output/Notepad--_windows.zip"
asset_name: Notepad--_windows.zip
asset_content_type: application/zip

0 comments on commit 7f74cdb

Please sign in to comment.