-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (47 loc) · 1.44 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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
- name: Upload Ke dalam Artifact
uses: actions/[email protected]
with:
name: ${{env.PROJECT_NAME}}
path: ${{env.FILE_OUTPUT}}
- name: Pembuatan Membuat Tag Rilis
id: release-id
uses: actions/create-release@v1
with:
tag_name: "v${{github.run_number}}"
release_name: ${{env.PROJECT_NAME}}
draft: false
prerelease: false
- uses: actions/checkout@v4
# - name: Upload Release
# uses: actions/upload-release-asset@v1
# with:
# upload_url: ${{ steps.release-id.outputs.upload_url }}
# asset_path: ${{env.FILE_OUTPUT}}
# asset_name: ${{env.PROJECT_NAME}}-${{github.run_number}}.zip
# asset_content_type: application/zip
#
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{env.FILE_OUTPUT}}
asset_name: v1
tag: ${{ github.ref }}
overwrite: true
body: "This is my release text"