Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- 'tests/**'
- '.github/workflows/ci.yml'

permissions:
contents: read
Expand Down
35 changes: 29 additions & 6 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,26 @@ jobs:
release:
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.publish_release.outputs.releases_created }}
release_created: ${{ steps.publish_release.outputs.release_created }}
tag_name: ${{ steps.publish_release.outputs.tag_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create or update Release PR and GitHub Release (release-please)
- name: Create or update Release PR (release-please)
id: publish_release
uses: googleapis/release-please-action@v4
with:
release-type: rust
package-name: git-mirror
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
skip-github-release: true

build_and_upload:
needs: release
if: needs.release.outputs.releases_created == 'true'
if: needs.release.outputs.release_created == 'true'
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -132,10 +133,32 @@ jobs:
run: |
echo "GitHub CLI will use GH_TOKEN environment variable for authentication"

- name: Upload release artifacts
- name: Upload artifacts to workflow
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.archive_name }}
path: |
${{ matrix.archive_name }}
${{ matrix.archive_name }}.sha256

create_release:
needs: [release, build_and_upload]
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
merge-multiple: true

- name: Create release and upload assets
env:
TAG: ${{ needs.release.outputs.tag_name }}
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
run: |
gh release upload "${{ env.TAG }}" ${{ matrix.archive_name }} ${{ matrix.archive_name }}.sha256
shell: bash
cd ./artifacts
gh release create "${{ env.TAG }}" \
--title "Release ${{ env.TAG }}" \
--generate-notes \
*.tar.gz *.zip *.sha256
Loading