Skip to content

Release

Release #6

Workflow file for this run

# .github/workflows/release.yml
name: Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Get version
id: pkg
run: echo "::set-output name=version::$(npm run -s version)"
- name: Archive distribution files
run: |
cd dist/
zip -r ../${{ steps.pkg.outputs.version }}.zip .
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
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.pkg.outputs.version }}.zip
asset_name: donder-hiroba-plus-v${{ steps.pkg.outputs.version }}.zip
asset_content_type: application/zip