feat(awooc 3.0.0rc8): changelog & readme #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create release | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
create-release: | |
name: Create release | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Webpack Build | |
run: | | |
npm install | |
npm run build:unminification | |
- name: Composer Autoloader | |
run: | | |
composer install --no-dev --prefer-dist --no-progress | |
composer dump-autoload -o | |
- name: Create deployment artifact | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: ${{ github.event.repository.name }}.zip | |
exclusions: '*.git* /*node_modules/* .editorconfig /*src/* .eslintrc.json .prettierrc.json gulpfile.js .stylelintrc.json package.json package-lock.json CHANGELOG.md README.md .gitattributes .gitignore .phpcs.xml composer.json composer.lock postcss.config.js webpack.config.js assets/js/*.LICENSE.txt' | |
- name: Store artifact for distribution | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }} | |
path: ${{ github.event.repository.name }}.zip | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }} | |
- name: Get Changelog Entry | |
id: changelog-reader | |
uses: mindsers/changelog-reader-action@v2 | |
with: | |
path: CHANGELOG.md | |
- name: Create Release | |
id: create-release | |
uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
prerelease: false | |
automatic_release_tag: ${{ steps.changelog-reader.outputs.version }} | |
- name: Upload release assets | |
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: ${{ github.event.repository.name }}.zip | |
asset_name: ${{ github.event.repository.name }}.zip | |
asset_content_type: application/zip |