Skip to content

Commit

Permalink
auto releasew
Browse files Browse the repository at this point in the history
  • Loading branch information
netzkollektiv committed Oct 13, 2022
1 parent 78ac99d commit a979f55
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tag:
- '*'

jobs:
release:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Run script file
id: build-release
run: |
yarn
yarn release
echo "::set-output name=filepath::$(ls *.tar.gz | head -1)"
echo "::set-output name=filename::$(basename `ls *.tar.gz | head -1`)"
shell: bash
- name: Create Release
id: create-release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: v${{ github.ref }}
body: "For a detailed overview of changes, please check out our [Changelog](https://netzkollektiv.com/docs/easycredit-ratenkauf-components/?path=%2Fdocs%2Fgetting-started-changelog--page)"
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create-release.outputs.upload_url }}
asset_path: ${{ steps.build-release.outputs.filepath }}
asset_name: ${{ steps.build-release.outputs.filename }}
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"generate": "stencil generate",
"storybook": "start-storybook -s ./dist -p 6006",
"storybook:build": "build-storybook -s ./dist",
"storybook:deploy": "source .env && rsync -rvz storybook-static/ $STORYBOOK_DEPLOY_DST"
"storybook:deploy": "source .env && rsync -rvz storybook-static/ $STORYBOOK_DEPLOY_DST",
"release" : "yarn build && (cd dist; tar czvf ../easycredit-ratenkauf-webcomponents-$(npm pkg get version | sed 's/\"//g').tar.gz .)"
},
"dependencies": {
"@open-wc/webpack-import-meta-loader": "^0.4.7",
Expand Down

0 comments on commit a979f55

Please sign in to comment.