stop vibe, just code
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
name: Build and Publish
|
name: Build and Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
branches:
|
types: [created]
|
||||||
- main
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -29,17 +25,9 @@ jobs:
|
|||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
go build -v -o dist/samba-configer .
|
go build -v -o dist/samba-configer .
|
||||||
|
|
||||||
- name: Upload package
|
- name: Create/Update Release and Upload Artifacts
|
||||||
if: startsWith(gitea.ref, 'refs/tags/')
|
uses: actions/release-action@v2 # Use Gitea's release action
|
||||||
env:
|
with:
|
||||||
GITEA_ACTOR: ${{ gitea.actor }}
|
tag_name: ${{ gitea.ref_name }}
|
||||||
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
files: |
|
||||||
SERVER_URL: ${{ gitea.server_url }}
|
dist/samba-configer
|
||||||
REPOSITORY_OWNER: ${{ gitea.repository_owner }}
|
|
||||||
VERSION: ${{ gitea.ref_name }}
|
|
||||||
run: |
|
|
||||||
test -n "$PACKAGE_TOKEN" || { echo "PACKAGE_TOKEN is empty"; exit 1; }
|
|
||||||
curl --fail-with-body \
|
|
||||||
--user "${GITEA_ACTOR}:${PACKAGE_TOKEN}" \
|
|
||||||
--upload-file dist/samba-configer \
|
|
||||||
"${SERVER_URL}/api/packages/${REPOSITORY_OWNER}/generic/samba-configer/${VERSION}/samba-configer-linux-amd64"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user