diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fbc9b4e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Build and Release + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + + - name: Build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.repository.upload_url }} + asset_path: ./target/release/ogp-creater + asset_name: ogp-creater + asset_content_type: application/octet-stream