Skip to content

Commit

Permalink
feat(ci): replace deprecated action wih gh CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Juarez Rudsatz authored and juarezr committed Sep 24, 2024
1 parent 41b0ab9 commit 6c3ff89
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 43 deletions.
61 changes: 21 additions & 40 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ jobs:
title: '${{ github.ref_name }}'
parameters: '${{ toJson(inputs) }}'
content: |
```json
${{ toJson(job) }}
```
### Release information
- Tag Name: ${{ github.event.release.tag_name }}
- Commit SHA: ${{ github.sha }}
Expand Down Expand Up @@ -146,49 +142,34 @@ jobs:

# region Upload Artifact

- name: Upload Debian Package
uses: actions/upload-release-asset@v1
if: matrix.platform == 'linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb
asset_name: ${{ env.ARTIFACT_NAME }}.deb
asset_content_type: application/vnd.debian.binary-package

- name: Upload RPM Package
uses: actions/upload-release-asset@v1
- name: Upload Debian, RPM and tar.gz Packages
if: matrix.platform == 'linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm
asset_name: ${{ env.ARTIFACT_NAME }}.rpm
asset_content_type: application/x-rpm
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.rpm
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.deb
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz
- name: Upload linux binary package
uses: actions/upload-release-asset@v1
if: matrix.platform == 'linux' || matrix.platform == 'macos'
- name: Upload MacOS Tar package
if: matrix.platform == 'macos'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz
asset_name: ${{ env.ARTIFACT_NAME }}.tar.gz
asset_content_type: application/octet-stream
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.tar.gz
- name: Upload windows binary package
uses: actions/upload-release-asset@v1
- name: Upload Windows Zip package
if: matrix.platform == 'windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.zip
asset_name: ${{ env.ARTIFACT_NAME }}.zip
asset_content_type: application/octet-stream
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
run: |
gh release upload --clobber ${{ env.RELEASE_VERSION }} ${{ env.ARTIFACT_DIR }}/${{ env.ARTIFACT_NAME }}.zip
# endregion

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ jobs:
title: '${{ github.ref_name }}'
parameters: '${{ toJson(inputs) }}'
content: |
```json
${{ toJson(job) }}
```
- Ref: ${{ github.head_ref }}
ci:
needs: run_when
Expand Down

0 comments on commit 6c3ff89

Please sign in to comment.