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 pipeline #95

Closed
wants to merge 68 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
00fa947
add wip pipeline
Tarasovych May 14, 2024
c5bb2dc
add npm i
Tarasovych May 14, 2024
87fa8b7
add node 20
Tarasovych May 14, 2024
dc298e2
add --legacy-peer-deps
Tarasovych May 14, 2024
b4f17ec
add inputs and action
Tarasovych May 14, 2024
13ba39a
add config
Tarasovych May 14, 2024
24ab3cb
add pip install
Tarasovych May 14, 2024
d612149
add python 3.10
Tarasovych May 15, 2024
d760219
add bump input
Tarasovych May 15, 2024
ab5d0cf
add secret
Tarasovych May 15, 2024
c428080
fix secret name
Tarasovych May 15, 2024
837ddc7
add name
Tarasovych May 15, 2024
5080049
remove tmp values
Tarasovych May 15, 2024
1deac00
change install command
Tarasovych May 15, 2024
fd4cc1d
add build pipeline
Tarasovych May 16, 2024
46b9d47
fix command
Tarasovych May 16, 2024
3acb984
fix command
Tarasovych May 16, 2024
8b24300
fix if
Tarasovych May 16, 2024
5f15196
remove subtype
Tarasovych May 16, 2024
8ab0b64
add yarn cache
Tarasovych May 16, 2024
65c4a63
change artifact name
Tarasovych May 16, 2024
6b6a2ef
integrate private npm registry
Tarasovych May 17, 2024
0abcf16
Merge branch 'main' into feat/release-pipeline
Tarasovych May 17, 2024
96f16d7
change if
Tarasovych May 17, 2024
3f18c83
change command
Tarasovych May 17, 2024
b486471
change command
Tarasovych May 17, 2024
daa58ed
add registry
Tarasovych May 17, 2024
8bd7d3d
change command
Tarasovych May 17, 2024
9588d30
change package name
Tarasovych May 17, 2024
f888733
remove build
Tarasovych May 17, 2024
41e6409
add permissions
Tarasovych May 17, 2024
3e907e4
Merge branch 'main' into feat/release-pipeline
Tarasovych May 17, 2024
8dacade
change permissions
Tarasovych May 17, 2024
6d31e73
change token
Tarasovych May 17, 2024
6d0226f
add env
Tarasovych May 17, 2024
078ac2e
remove permissions
Tarasovych May 17, 2024
fc4c09e
change auth
Tarasovych May 17, 2024
ccf1685
change auth
Tarasovych May 17, 2024
64ce9dc
change auth
Tarasovych May 17, 2024
7aa796a
debug
Tarasovych May 17, 2024
c03d1c4
debug
Tarasovych May 17, 2024
504a45d
debug
Tarasovych May 17, 2024
c594c78
remove env
Tarasovych May 17, 2024
4e54fb4
add yarn login
Tarasovych May 17, 2024
3941e7e
add always-auth
Tarasovych May 17, 2024
fc25214
add config
Tarasovych May 17, 2024
9e75911
add token
Tarasovych May 17, 2024
928b06f
change token
Tarasovych May 17, 2024
9538eda
debug
Tarasovych May 17, 2024
823174b
change permissions
Tarasovych May 17, 2024
3d5a7ef
change permissions
Tarasovych May 17, 2024
9e67c18
debug
Tarasovych May 17, 2024
31eee32
debug
Tarasovych May 17, 2024
02d6f8d
change .npmrc
Tarasovych May 17, 2024
e839cae
change auth
Tarasovych May 17, 2024
aa9db8a
change auth
Tarasovych May 17, 2024
2f6e06b
change auth
Tarasovych May 21, 2024
7a8573f
debug
Tarasovych May 21, 2024
fc3bee0
debug
Tarasovych May 21, 2024
81c4e8e
debug
Tarasovych May 21, 2024
932c58a
debug
Tarasovych May 21, 2024
d563dba
add scope
Tarasovych May 21, 2024
b40bb9c
debug
Tarasovych May 21, 2024
97d7447
debug
Tarasovych May 21, 2024
17de59b
replace pipelines
Tarasovych Jun 6, 2024
9cae4d3
Merge branch 'main' into feat/release-pipeline
Tarasovych Jun 6, 2024
67a9a7c
fix package name
Tarasovych Jun 6, 2024
66bcf92
debug
Tarasovych Jun 7, 2024
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
25 changes: 25 additions & 0 deletions .github/workflows/pr-clean-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Delete PR package

on:
pull_request:
types:
- closed

jobs:
delete:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- id: version
run: |
curl -X GET -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/orgs/weka/packages/npm/weka-ui-components/versions >> $HOME/versionIds.json
echo "id=$(jq -r '.[] | select(.name == "${{ github.head_ref }}").id' $HOME/versionIds.json)" >> $GITHUB_OUTPUT

- run: echo "${{ steps.version.outputs.id }}"

- uses: actions/delete-package-versions@v5
with:
package-version-ids: ${{ steps.version.outputs.id }}
package-name: weka-ui-components
package-type: npm
44 changes: 44 additions & 0 deletions .github/workflows/pr-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish PR package

on:
pull_request:

jobs:
publish:
if: "!contains(github.event.pull_request.labels.*.name, 'nopublish')"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- run: echo '${{ secrets.PAT }}' | wc
# - uses: actions/checkout@v4
#
# - uses: actions/setup-node@v4
# with:
# node-version: '20'
# cache: 'yarn'
# registry-url: https://npm.pkg.github.com/
# scope: '@weka'
#
# - run: echo "$(jq '.version="${{ github.head_ref }}"' package.json)" > package.json
#
# - run: yarn install
#
# - id: version
# run: |
# curl -X GET -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/orgs/weka/packages/npm/weka-ui-components/versions >> $HOME/versionIds.json
# echo "id=$(jq -r '.[] | select(.name == "${{ github.head_ref }}").id' $HOME/versionIds.json)" >> $GITHUB_OUTPUT
#
# - run: echo "${{ steps.version.outputs.id }}"
#
# - uses: actions/delete-package-versions@v5
# with:
# package-version-ids: ${{ steps.version.outputs.id }}
# package-name: weka-ui-components
# package-type: npm
# if: ${{ steps.version.outputs.id }}
#
# - run: yarn publish
# env:
# NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish package

on:
push:
branches:
- main

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
registry-url: https://npm.pkg.github.com/
scope: '@weka'

- run: yarn install

- run: echo "lines=$(git diff package.json | grep '+\s*"version"' -c)" >> $GITHUB_OUTPUT
id: version-diff

- run: yarn publish --minor
if: ${{ steps.version-diff.outputs.lines == 1 }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: yarn publish
if: ${{ steps.version-diff.outputs.lines == 0 }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
//npm.fontawesome.com/C1F19C49-B88B-4523-8273-6C86A14E7F58=TOKEN
//npm.fontawesome.com/:_authToken=C1F19C49-B88B-4523-8273-6C86A14E7F58
//registry.npmjs.org/:_authToken=52d68335-e507-46a1-835f-c73f19279b12
@weka:registry=https://npm.pkg.github.com
registry=https://registry.yarnpkg.com/
always-auth=true
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"name": "@weka.io/weka-ui-components",
"name": "@weka/weka-ui-components",
"repository": {
"type": "git",
"url": "https://github.com/weka/weka-ui-components.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
},
"version": "1.77.0",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down