Skip to content

Commit

Permalink
Add the action
Browse files Browse the repository at this point in the history
  • Loading branch information
shepmaster committed Apr 24, 2024
1 parent 163546d commit 061d16d
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: "Publish crate to our Margo registry"
on: push

jobs:
build:
runs-on: ubuntu-latest

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

- name: Select Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Package crate
run: |-
set -eu
cargo package
mkdir /tmp/crates
mv ./target/package/*.crate /tmp/crates
- name: Checkout GitHub Pages
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Publish crate
uses: integer32llc/margo-actions@main
with:
crates: /tmp/crates/*.crate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push to GitHub Pages
run: |-
set -eu
git config user.email "[email protected]"
git config user.name "Roko"
git add .
git commit -m 'Publish'
git push origin gh-pages

0 comments on commit 061d16d

Please sign in to comment.