Skip to content

Commit

Permalink
Merge pull request #112 from lidofinance/develop
Browse files Browse the repository at this point in the history
Update workflows
  • Loading branch information
Jeday authored Mar 4, 2024
2 parents 7f37513 + 5645dd9 commit c589ab1
Show file tree
Hide file tree
Showing 4 changed files with 1,267 additions and 1,059 deletions.
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

0 comments on commit c589ab1

Please sign in to comment.