2022-03-10 01:32:29 +01:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
name: Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-07-05 16:24:49 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: master # We have to checkout master or PNPM fails. Tag should be on master anyway.
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-08-28 20:12:09 +02:00
|
|
|
node-version: '16'
|
2022-07-05 16:24:49 +02:00
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
|
|
with:
|
2022-08-28 20:12:09 +02:00
|
|
|
version: 7.8.0
|
2022-07-05 16:24:49 +02:00
|
|
|
run_install: true
|
2022-07-05 17:43:33 +02:00
|
|
|
- uses: rhysd/changelog-from-release/action@v2
|
|
|
|
with:
|
|
|
|
file: packages/iconoir-flutter/CHANGELOG.md
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
2022-07-05 17:50:07 +02:00
|
|
|
commit: false
|
2022-07-05 16:24:49 +02:00
|
|
|
- run: pnpm run build
|
|
|
|
- run: pnpm run prepublish-all
|
|
|
|
env:
|
|
|
|
TAG_NAME: ${{ github.ref_name }}
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: Release Version ${{ github.ref_name }}
|
|
|
|
branch: master
|
|
|
|
- run: git -c user.email="actions@github.com" -c user.name="GitHub Actions" tag -fa ${{ github.ref_name }} -m "${{ github.ref_name }}"
|
|
|
|
- run: git push -f origin ${{ github.ref_name }}
|
|
|
|
- run: npm publish --access public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
- run: pnpm -r publish --filter ./packages --access public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
2022-07-05 17:18:56 +02:00
|
|
|
- uses: sakebook/actions-flutter-pub-publisher@v1.4.0
|
2022-07-05 16:24:49 +02:00
|
|
|
with:
|
|
|
|
credential: ${{ secrets.PUB_CREDENTIAL_JSON }}
|
|
|
|
package_directory: ./packages/iconoir-flutter
|
2022-08-28 20:12:09 +02:00
|
|
|
- name: Build
|
|
|
|
run: ./node_modules/.bin/next build
|
|
|
|
working-directory: iconoir.com
|
|
|
|
- name: Export
|
|
|
|
run: ./node_modules/.bin/next export
|
|
|
|
working-directory: iconoir.com
|
|
|
|
- name: Setup Pages
|
|
|
|
uses: actions/configure-pages@v1
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
path: './iconoir.com/out'
|
|
|
|
website:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: deploy
|
|
|
|
needs: [release]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: master # We have to checkout master or PNPM fails. Tag should be on master anyway.
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/.pnpm-store
|
|
|
|
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
|
|
|
node-version: '16'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- uses: pnpm/action-setup@v2.1.0
|
|
|
|
with:
|
|
|
|
version: 7.8.0
|
|
|
|
run_install: true
|
|
|
|
- name: Build Packages
|
|
|
|
run: pnpm run dist
|
|
|
|
- name: Build
|
|
|
|
run: ./node_modules/.bin/next build
|
|
|
|
working-directory: iconoir.com
|
|
|
|
- name: Export
|
|
|
|
run: ./node_modules/.bin/next export
|
|
|
|
working-directory: iconoir.com
|
|
|
|
- name: Setup Pages
|
|
|
|
uses: actions/configure-pages@v1
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
path: './iconoir.com/out'
|