first commit #23
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
#Nama biasa | |
name: TestRelease | |
#Triger workflow (script ini) untuk berjalan ketika melakukan push dan pull_request ke dalam main branch | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: [ "main" ] | |
#Tindakan yang akan dilkukan atau yang akan di kerjakan dalam workflow ini | |
jobs: | |
#Menetapkan mesin virtual untuk mengerjakan proses | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
#Mendefinisikan Global ENV Variabel, untuk 'nanti' Dipanggil ulang. | |
env: | |
FILE_OUTPUT: "./test.txt" | |
NAMA_REPO: ${{github.event.repository.name}} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
#Langkah | |
steps: | |
- name: Menyingkronkan Repository | |
uses: actions/checkout@v4 | |
- name: Membuat File | |
run: "echo 'Hello World' > ${{env.FILE_OUTPUT}}" | |
- name: Mengambil Nama Repository | |
run: echo ${{env.NAMA_REPO}} | |
- name: Upload ke Artefak dengan nama dan file yang telah di tentukan | |
uses: actions/[email protected] | |
with: | |
name: ${{github.event.repository.name}} | |
path: ./txt | |
- name: Upload File ${{env.FILE_OUTPUT}} ke Release | |
uses: xresloader/upload-to-github-release@v1 | |
with: | |
file: ${{env.FILE_OUTPUT}} | |
tag_name: "Release" | |
tags: true | |
verbose: true | |
draft: true |