-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'Release tag' | ||
required: true | ||
default: 'Alpha' | ||
options: | ||
- Patch | ||
- Stable | ||
- Alpha | ||
- Beta | ||
|
||
jobs: | ||
create-release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' # Utilisez la version de Node.js que vous préférez | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build the project | ||
run: pnpm run build # Assurez-vous d'avoir une commande build dans votre package.json | ||
|
||
- name: Get tag | ||
id: get_tag | ||
run: echo "::set-output name=tag::${{ github.event.inputs.tag }}" | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ steps.get_tag.outputs.tag }} | ||
release_name: Release ${{ steps.get_tag.outputs.tag }} | ||
body: | | ||
Release notes for version ${{ steps.get_tag.outputs.tag }} | ||
draft: false | ||
prerelease: ${{ steps.get_tag.outputs.tag != 'Stable' }} | ||
|
||
- name: 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: ./path/to/your/build.zip # Changez ceci avec le chemin réel de votre build | ||
asset_name: build.zip | ||
asset_content_type: application/zip |