Test #82
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
name: Release Action | |
on: | |
push: | |
branches: ["main"] | |
jobs: | |
build: | |
env: | |
TAG: Release | |
PROJECT_NAME: ${{github.event.repository.name}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FILE_OUTPUT: ./dist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check Directory | |
run: ls -la | |
# ... (Langkah-langkah untuk membangun file ZIP Anda di direktori ./dist) | |
- name: Upload Ke dalam Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{env.PROJECT_NAME}} | |
path: ${{env.FILE_OUTPUT}} | |
- name: Dapatkan atau buat rilis | |
id: get_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true # Izinkan pembaruan pada rilis yang sudah ada | |
tag: v1 # Gunakan tag "v1" secara konsisten | |
name: Release v1 # Nama rilis (bisa diubah sesuai keinginan) | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: ${{env.FILE_OUTPUT}}/${{env.PROJECT_NAME}}.zip | |
asset_name: ${{env.PROJECT_NAME}}-v1.zip | |
asset_content_type: application/zip |