Remove experimental HMR server (#61) #16
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: Release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- package.json | |
workflow_dispatch: | |
jobs: | |
tag-release: | |
name: Create release tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- id: create-tag | |
run: RELEASE_TAG=v$(node -e "console.log(require('./package.json').version)") && git tag $RELEASE_TAG && git push origin $RELEASE_TAG | |
continue-on-error: true | |
outputs: | |
tag-outcome: ${{ steps.create-tag.outcome }} | |
release: | |
name: Release mo-dev | |
needs: [tag-release] | |
if: needs.tag-release.outputs.tag-outcome == 'success' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: 'npm' | |
- name: Install dfx | |
uses: dfinity/setup-dfx@main | |
- name: Install Mops | |
run: npm i -g ic-mops | |
- run: dfx cache install | |
- run: npm ci | |
- run: npm run package | |
- name: Get version | |
id: version | |
run: echo ::set-output\ name=TAG_NAME::v$(node -e "console.log(require('./package.json').version)") | |
- name: Create release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by GitHub Actions | |
with: | |
tag_name: ${{ steps.version.outputs.TAG_NAME }} | |
release_name: mo-dev ${{ steps.version.outputs.TAG_NAME }} | |
body: Portable `mo-dev` binaries for Linux, macOS, and Windows. | |
draft: false | |
prerelease: false | |
- name: Upload release (Linux) | |
id: upload-release-linux | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pkg/mo-dev-linux.tar.gz | |
asset_name: mo-dev-linux.tar.gz | |
asset_content_type: application/octet-stream | |
- name: Upload release (macOS) | |
id: upload-release-macos | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pkg/mo-dev-macos.tar.gz | |
asset_name: mo-dev-macos.tar.gz | |
asset_content_type: application/octet-stream | |
- name: Upload release (Windows) | |
id: upload-release-windows | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: pkg/mo-dev-windows.zip | |
asset_name: mo-dev-windows.zip | |
asset_content_type: application/octet-stream |