Skip to content

Commit

Permalink
release.yml for GH releases
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrippling committed Jul 26, 2024
1 parent 0ea47f2 commit e6b97f1
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: podsync release

on:
pull_request:
push:
tags:
- 'v*.*.*'
branches:
- feat/gh-release

jobs:
build:
name: Build and Release
runs-on: ubuntu-latest

#permissions: write-all
permissions:
"contents": "write"

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --features backend-sql

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/podsync
asset_name: podsync
asset_content_type: application/octet-stream

0 comments on commit e6b97f1

Please sign in to comment.