Skip to content

Commit f536398

Browse files
feat: Actions workflow to build and upload assets on release
1 parent 144d508 commit f536398

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build and Release Libraries
22

3+
permissions:
4+
contents: write
5+
packages: read
6+
37
on:
48
release:
59
types:
@@ -13,16 +17,25 @@ on:
1317

1418

1519
jobs:
16-
package:
20+
add-libs:
1721
runs-on: ubuntu-latest
18-
container:
19-
image: codewithkyrian/transformersphp-libs:latest
20-
env:
21-
TAG: ${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.event.inputs.tag }}
2222

2323
steps:
24-
- name: Upload Artifacts
25-
uses: actions/upload-artifact@v4
24+
- name: Log in to GHCR
25+
uses: docker/login-action@v3
26+
with:
27+
registry: ghcr.io
28+
username: ${{ github.actor }}
29+
password: ${{ secrets.GITHUB_TOKEN }}
30+
31+
- name: Build Libraries
32+
run: |
33+
TAG=${{ startsWith(github.ref, 'refs/tags/') && github.ref_name || github.event.inputs.tag }}
34+
docker run --rm -v ./libs:/libs -e TAG=$TAG ghcr.io/codewithkyrian/transformers-php:latest
35+
ls libs
36+
37+
- name: Add Libraries to Release
38+
uses: softprops/action-gh-release@v2
2639
with:
27-
name: packages
28-
path: /packages/*
40+
files: |
41+
libs/*

0 commit comments

Comments
 (0)