mirror of
https://git.sdf.org/epl692/tui-mqtt-chat.git
synced 2025-12-08 05:48:49 -05:00
feat: migrate to gitea actions
This commit is contained in:
48
.gitea/workflows/main.yml
Normal file
48
.gitea/workflows/main.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
name: Rust
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
|
||||
release:
|
||||
needs: build
|
||||
if: startsWith(gitea.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build release binary
|
||||
run: cargo build --release --verbose
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/gitea-create-release@v1
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ gitea.ref }}
|
||||
release_name: Release ${{ gitea.ref }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/gitea-upload-asset@v1
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./target/release/tui-mqtt-chat
|
||||
asset_name: tui-mqtt-chat
|
||||
asset_content_type: application/octet-stream
|
||||
Reference in New Issue
Block a user