-
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
12 additions
and
26 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 |
---|---|---|
@@ -1,46 +1,32 @@ | ||
name: Release Action | ||
name: Release v1 | ||
|
||
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: Zip Repository | ||
run: zip -r apk-autorelease.zip . -x .git* | ||
|
||
- name: Dapatkan atau buat rilis | ||
id: get_release | ||
uses: ncipollo/release-action@v1 | ||
- name: Buat atau Update Tag dan Rilis | ||
id: create_release | ||
uses: actions/create-release@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) | ||
tag_name: v1 | ||
release_name: Release v1 | ||
draft: false | ||
prerelease: false | ||
replace: true # Ganti tag yang sudah ada | ||
|
||
- 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 | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./apk-autorelease.zip | ||
asset_name: apk-autorelease-v1.zip | ||
asset_content_type: application/zip |