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: new gha workflow to create releases with bundled assets #2153

Merged
merged 2 commits into from
Oct 9, 2023
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
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: release
on:
push:
tags:
- "v*"
# workflow_dispatch: {}

jobs:
release:
runs-on: ubuntu-20.04
# environment: RELEASE
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16

- name: Restore Lerna
id: yarn-cache
uses: actions/cache@v3
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install project dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn

- name: Bootstrap
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: |
yarn bootstrap

- name: Build Components
run: |
yarn workspace @telekom/scale-components build
yarn workspace @telekom/scale-components zip

- name: Build React Proxy
run: |
yarn workspace @telekom/scale-components-react build
yarn workspace @telekom/scale-components-react zip

- name: Get Package Version
id: package-version
uses: martinbeentjes/[email protected]
with:
path: packages/components

- name: Create GitHub Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: ${{ steps.package-version.outputs.current-version }}
files: |
LICENSE
packages/components/telekom-scale-components-${{ steps.package-version.outputs.current-version }}.zip
packages/components-react/telekom-scale-components-react-${{ steps.package-version.outputs.current-version }}.zip
1 change: 1 addition & 0 deletions packages/components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
},
"scripts": {
"build": "yarn clean && yarn rollup",
"zip": "zip -vr telekom-scale-components-react-$npm_package_version.zip dist/ -x '*.DS_Store'",
"clean": "rimraf dist",
"format": "prettier --write \"package.json\"",
"rollup": "rollup -c"
Expand Down
1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"build:whitelabel": "WHITELABEL=1 stencil build --docs-readme",
"build:watch": "stencil build --watch --serve --config stencil-dev.config.ts",
"build:staging": "stencil build --config stencil-staging.config.ts",
"zip": "zip -vr telekom-scale-components-$npm_package_version.zip dist/ -x '*.DS_Store' 'dist/collection/**'",
"start": "stencil build --dev --watch --serve --config stencil-dev.config.ts",
"dev": "yarn start",
"test": "stencil test --max-workers=2",
Expand Down