-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add release.sh script * feat: Add publishing workflow and other files. * feat: Remove logger package. * fix: Set initial version numbers and refer to them in internal dependencies. * fix: Update license to MIT * feat: Finish publishing workflow * feat: Remove --dry-run when publishing crates. * fix: Fix crates order when publishing * fix: Set initial version to 0.2.1-dev for testing releases. * Bump version of time crate; Split publishing workflow into step per crate. * fix: Set initial version to 0.2.2-dev for testing releases. * fix: Use ubuntu as build image. * fix: Set initial version to 0.2.3-dev for testing releases. * fix: Use bash as shell runner * fix: Declare time dependency with formatting feature. * fix: Rename 'packages/metrics' to 'packages/talos_metrics' * fix: Set initial version to 0.2.3-dev for testing releases. * fix: Fixing talos_metrics toml file * chore(npm): Release npm 0.2.6 * chore(crate): Release 0.2.6 * chore(npm): Release 0.2.7-dev * chore(crate): Release 0.2.7-dev
- Loading branch information
1 parent
800228e
commit 4e540d9
Showing
61 changed files
with
858 additions
and
724 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
# Publishes tagged version to crates.io and to GitHub Packages NPM | ||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
name: Publish tagged crates and NPMs | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]' | ||
env: | ||
REGISTRY: "https://npm.pkg.github.com" | ||
SDK_JS_PACKAGE_NAME: "@kindredgroup/cohort_sdk_js" | ||
DIR_SDK_JS: packages/cohort_sdk_js | ||
DIR_SDK_JS_CLIENT: cohort_sdk_client | ||
jobs: | ||
publish: | ||
name: Publish crates | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
- run: scripts/ubuntu-setup.sh | ||
- run: rustup component add rustfmt clippy | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
check-latest: true | ||
registry-url: "https://npm.pkg.github.com" | ||
|
||
- name: "Extract tag name" | ||
shell: bash | ||
run: |- | ||
echo "VERSION_NAME=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | ||
- name: "Publish ${{ env.DIR_SDK_JS }} NPM" | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: |- | ||
currentDir=$(pwd) | ||
cd $DIR_SDK_JS | ||
pwd | ||
ls -l | ||
echo "Current version is" | ||
npm version | ||
npm publish --foreground-scripts | ||
echo "" | ||
- name: "Publish ${{ env.DIR_SDK_JS_CLIENT }} NPM" | ||
shell: bash | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: |- | ||
currentDir=$(pwd) | ||
cd $DIR_SDK_JS_CLIENT | ||
pwd | ||
ls -l | ||
echo "Current version is" | ||
echo "Updating $SDK_JS_PACKAGE_NAME to $VERSION_NAME" | ||
rm package-lock.json || true | ||
echo "D: npm install $SDK_JS_PACKAGE_NAME@$VERSION_NAME --foreground-scripts" | ||
npm install $SDK_JS_PACKAGE_NAME@$VERSION_NAME --foreground-scripts | ||
npm version | ||
npm publish --foreground-scripts | ||
echo "" | ||
cd $currentDir | ||
- name: Publish talos_metrics@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_metrics | ||
- name: Publish talos_suffix@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_suffix | ||
- name: Publish talos_certifier@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_certifier | ||
- name: Publish talos_common_utils@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_common_utils | ||
- name: Publish talos_rdkafka_utils@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_rdkafka_utils | ||
- name: Publish talos_certifier_adapters@ ${{ env.VERSION_NAME }} crate | ||
shell: bash | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN_TALOS }} | ||
run: |- | ||
cargo publish -v -p talos_certifier_adapters |
Oops, something went wrong.