Skip to content

Commit

Permalink
feat: make on release, not create pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
greendoescode authored Sep 3, 2024
1 parent e27571d commit 143aaf4
Showing 1 changed file with 18 additions and 25 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Release

on: [workflow_dispatch]
on:
release:
types:
- released
workflow_dispatch:

jobs:
build_and_test:
Expand Down Expand Up @@ -47,30 +51,19 @@ jobs:
path: |
.dist/win-x64
- name: Check release exists
uses: mukunku/[email protected]
id: check-tag
with:
tag: 'V${{ steps.get-version.outputs.version }}'
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Create or update GitHub Release
id: create_or_update_github_release
uses: actions/create-release@v1
- name: Upload Artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
tag_name: "V${{ steps.get-version.outputs.version }}"
release_name: "Pre-release ${{ steps.get-version.outputs.version }}"
draft: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: steps.check-tag.outputs.exists != 'true'
name: build-artifact
retention-days: 30
if-no-files-found: error
path: .dist/zipped/*.zip


- name: Update nightly release
uses: pyTooling/Actions/releaser@main
- name: Upload to Release
id: release
if: ${{ github.event_name == 'release' }}
uses: shogo82148/actions-upload-release-asset@dccd6d23e64fd6a746dce6814c0bde0a04886085 # v1.7.2
with:
tag: ${{ steps.get-version.outputs.version }}
token: ${{ secrets.GITHUB_TOKEN }}
files: .dist/zipped/*.zip
if: steps.check-tag.outputs.exists != 'true'
upload_url: ${{ github.event.release.upload_url }}
overwrite: true
asset_path: .dist/zipped/*.zip

0 comments on commit 143aaf4

Please sign in to comment.