Use cargo-workspaces for publishing multiple crates (#67)

* use cargo-workspaces

* add git information
pull/68/head
Takayuki Maeda 3 years ago committed by GitHub
parent 55fec4cc35
commit 09f4eeda83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -9,6 +9,8 @@ jobs:
release: release:
name: Release name: Release
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
outputs:
gobang_version: ${{ env.GOBANG_VERSION }}
env: env:
# For some builds, we use cross to test on 32-bit and big-endian # For some builds, we use cross to test on 32-bit and big-endian
# systems. # systems.
@ -53,7 +55,7 @@ jobs:
# Apparently, this is the right way to get a tag name. Really? # Apparently, this is the right way to get a tag name. Really?
# #
# See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027 # See: https://github.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
echo "GOBANG_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV echo "GOBANG_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
echo "version is: ${{ env.GOBANG_VERSION }}" echo "version is: ${{ env.GOBANG_VERSION }}"
- name: Checkout repository - name: Checkout repository
@ -131,13 +133,11 @@ jobs:
needs: release needs: release
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- run: cargo login ${CRATES_IO_TOKEN} - name: Cargo publish
env:
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
- name: Cargo puhlish database-tree
run: | run: |
cd database-tree git config --global user.email "runner@gha.local"
cargo publish git config --global user.name "Github Action"
- run: sleep 2 cargo workspaces publish \
- run: cargo publish --yes --force '*' --exact \
if: ${{ always() }} --no-git-commit --allow-dirty --skip-published \
custom ${{ needs.create-release.outputs.gobang_version }}

Loading…
Cancel
Save