diff --git a/.github/workflows/rust.yml b/.github/workflows/push.yml similarity index 100% rename from .github/workflows/rust.yml rename to .github/workflows/push.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ec60ec0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,39 @@ +name: Release + +permissions: + contents: write + +on: + push: + tags: + - v.* + +jobs: + create-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/create-gh-release-action@v1 + with: + # (optional) Path to changelog. + changelog: RELEASE-NOTES.md + # (required) GitHub token for creating GitHub Releases. + token: ${{ secrets.GITHUB_TOKEN }} + + upload-assets: + needs: create-release + strategy: + matrix: + include: + - target: x86_64-unknown-linux-gnu + os: ubuntu-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: taiki-e/upload-rust-binary-action@v1 + with: + target: ${{ matrix.target }} + bin: electrs + archive: $bin-$tag-${{ matrix.target }} + include: LICENSE,README.md,RELEASE-NOTES.md + token: ${{ secrets.GITHUB_TOKEN }}