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 23, 2024
1 parent 0ea47f2 commit a4b8ab5
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:
# temporary
push:
branches:
- '*'
push:
tags:
- 'v*.*.*'

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

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
run: cargo build --release

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

create_release:
name: Create GitHub Release
runs-on: ubuntu-latest

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

- 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

0 comments on commit a4b8ab5

Please sign in to comment.