adding cargo publish
This commit is contained in:
parent
b15d7b5c38
commit
984d0faa78
@ -56,6 +56,48 @@ jobs:
|
||||
run: cargo build
|
||||
working-directory: ./draught
|
||||
|
||||
publishLib:
|
||||
runs-on: ubuntu-latest
|
||||
name: Package Library
|
||||
needs: [ build-web ] # for ignoring bad builds
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
github-server-url: https://gitea.sheep-ghoul.ts.net
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: Add SarGit Repo
|
||||
run: |
|
||||
cat <<EOF > ~/.cargo/config.toml
|
||||
[registry]
|
||||
default = "sargit"
|
||||
|
||||
[registries.sargit]
|
||||
index = "sparse+https://git.sarsoo.xyz/api/packages/${{ secrets.DOCKERHUB_USERNAME }}/cargo/"
|
||||
|
||||
[net]
|
||||
git-fetch-with-cli = true
|
||||
EOF
|
||||
|
||||
- name: Add SarGit Credentials
|
||||
run: |
|
||||
cat <<EOF > ~/.cargo/credentials.toml
|
||||
[registries.sargit]
|
||||
token = "Bearer ${{ secrets.DOCKERHUB_TOKEN }}"
|
||||
EOF
|
||||
|
||||
- name: Cargo Publish
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: publish
|
||||
args: --package draughtlib
|
||||
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
name: Package Container
|
||||
|
Loading…
Reference in New Issue
Block a user