Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Release tools #93

Merged
merged 22 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
597fce3
feat: Add release.sh script
fmarek-kindred Oct 25, 2023
44ed134
feat: Add publishing workflow and other files.
fmarek-kindred Oct 25, 2023
0e680ef
feat: Remove logger package.
fmarek-kindred Oct 25, 2023
2e16032
fix: Set initial version numbers and refer to them in internal depend…
fmarek-kindred Oct 27, 2023
9e1ad02
fix: Update license to MIT
fmarek-kindred Oct 27, 2023
ba4fe36
feat: Finish publishing workflow
fmarek-kindred Oct 27, 2023
bbc5631
feat: Remove --dry-run when publishing crates.
fmarek-kindred Oct 27, 2023
fac7479
fix: Fix crates order when publishing
fmarek-kindred Oct 27, 2023
51a8670
fix: Set initial version to 0.2.1-dev for testing releases.
fmarek-kindred Oct 27, 2023
8a3f2f7
Bump version of time crate; Split publishing workflow into step per c…
fmarek-kindred Oct 27, 2023
7691a48
fix: Set initial version to 0.2.2-dev for testing releases.
fmarek-kindred Oct 27, 2023
202b271
fix: Use ubuntu as build image.
fmarek-kindred Oct 27, 2023
79a7c59
fix: Set initial version to 0.2.3-dev for testing releases.
fmarek-kindred Oct 27, 2023
edfef38
fix: Use bash as shell runner
fmarek-kindred Oct 27, 2023
7429f6d
fix: Declare time dependency with formatting feature.
fmarek-kindred Oct 27, 2023
aa5f37b
fix: Rename 'packages/metrics' to 'packages/talos_metrics'
fmarek-kindred Oct 29, 2023
12565eb
fix: Set initial version to 0.2.3-dev for testing releases.
fmarek-kindred Oct 29, 2023
5733ecb
fix: Fixing talos_metrics toml file
fmarek-kindred Oct 29, 2023
f0e8d70
chore(npm): Release npm 0.2.6
fmarek-kindred Oct 30, 2023
0bbdbb9
chore(crate): Release 0.2.6
fmarek-kindred Oct 30, 2023
ec637a5
chore(npm): Release 0.2.7-dev
fmarek-kindred Oct 30, 2023
93150cd
chore(crate): Release 0.2.7-dev
fmarek-kindred Oct 30, 2023
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
110 changes: 110 additions & 0 deletions .github/workflows/publish.yml
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
Loading