fix: adapter status state to be kept independently (#1790) #694
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
name: Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: GitHub context | |
run: echo "$GITHUB_CONTEXT" | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
- name: Checkout | |
if: github.ref == 'refs/heads/main' | |
uses: actions/checkout@v3 | |
- name: Fetch all tags (for releases) | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Setup Node (uses version in .nvmrc) | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Storing release version for changeset | |
id: release_version | |
run: ./scripts/echo-release-version.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Ouptut version | |
run: echo "The version is ${{ steps.release_version.outputs.VERSION }}" | |
- name: Creating .npmrc | |
run: | | |
cat << EOF > "$HOME/.npmrc" | |
[email protected] | |
//registry.npmjs.org/:_authToken=$NPM_TOKEN | |
EOF | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Verify NPM user | |
run: yarn auth | |
- name: Building packages | |
run: yarn build | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
# uses: changesets/action@v1 | |
uses: dotansimha/[email protected] | |
with: | |
publish: yarn changeset publish | |
version: yarn changeset:version-and-format | |
title: 'ci(changesets): version packages' | |
commit: 'ci(changesets): version packages' | |
createGithubReleases: aggregate | |
githubReleaseName: v${{ steps.release_version.outputs.VERSION }} | |
githubTagName: v${{ steps.release_version.outputs.VERSION }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
- name: Publishing canary releases to npm registry | |
if: steps.changesets.outputs.published != 'true' && github.ref == 'refs/heads/main' | |
run: | | |
git checkout main | |
yarn changeset version --snapshot canary | |
yarn changeset publish --tag canary | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |