Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
8c7ffdf5a7 | |||
78f53564b1 | |||
4e84f9fdc9 |
@@ -6,33 +6,30 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: [your-runner-name]
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: 'GiteaAdmin/hello_gitea'
|
||||||
|
path: 'hello_gitea'
|
||||||
|
token: ${{ secrets.GITEATOKEN }}
|
||||||
|
git-server-url: 'https://direct-dev.ru/gitea'
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
cd hello_gitea
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
go build -o bin/hello-api-${{ github.ref_name }} main.go
|
go build -o bin/hello-api-${{ github.ref_name }} main.go
|
||||||
|
ls -la bin/
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: actions/create-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
||||||
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
GITHUB_API_URL: 'https://direct-dev.ru/gitea/api/v1'
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
tag_name: ${{ github.ref_name }}
|
||||||
release_name: "Release ${{ github.ref }}"
|
name: "Release ${{ github.ref_name }}"
|
||||||
body: "Automated release"
|
body: "Automated release"
|
||||||
draft: false
|
files: |
|
||||||
prerelease: false
|
hello_gitea/bin/hello-api-${{ github.ref_name }}
|
||||||
|
|
||||||
- name: Upload Asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITEATOKEN }}
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEATOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./bin/hello-api-${{ github.ref_name }}
|
|
||||||
asset_name: hello-api-${{ github.ref_name }}
|
|
Reference in New Issue
Block a user