From a4b8ab55e7faf63156cc2287b9c8fbcce30c64a0 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Tue, 23 Jul 2024 08:17:51 +0100 Subject: [PATCH] release.yml for GH releases --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6c53a83 --- /dev/null +++ b/.github/workflows/release.yml @@ -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