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

Update workflows #112

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 43 additions & 0 deletions .github/workflows/publish-alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Publish Beta version to registry
on:
workflow_dispatch:

permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
id-token: write # to enable use of OIDC for npm provenance

jobs:
publish:
runs-on: ubuntu-latest
environment: development
# restricts job to develop branch
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Build
run: yarn build:packages

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: yarn npm audit

- name: Publish Alpha
run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ jobs:
- name: Authenticate in npm
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
echo "workspaces-update = false" >> .npmrc
echo "provenance = true" >> .npmrc
echo "workspaces-update=false" >> .npmrc
echo "provenance=true" >> .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
run: yarn multi-semantic-release --deps.bump=override --deps.release=patch --sequential-init
env:
NPM_CONFIG_PROVENANCE: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@commitlint/config-conventional": "^17.7.0",
"@lidofinance/eslint-config": "^0.35.0",
"@next/eslint-plugin-next": "^14.0.1",
"@qiwi/multi-semantic-release": "6.7.0",
"@qiwi/multi-semantic-release": "7.1.1",
"@typescript-eslint/eslint-plugin": "^5",
"@typescript-eslint/parser": "^5.46.0",
"eslint": "^8.46.0",
Expand Down Expand Up @@ -57,7 +57,12 @@
],
"release": {
"branches": [
"main"
"main",
{
"name": "develop",
"channel": "alpha",
"prerelease": "alpha"
}
]
},
"packageManager": "[email protected]",
Expand Down
Loading