Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
QiubyZ committed Oct 12, 2024
1 parent dcfb808 commit 8d9a41c
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/main.yml
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

0 comments on commit 8d9a41c

Please sign in to comment.