Skip to content

Commit

Permalink
Create Actions workflow for creating release
Browse files Browse the repository at this point in the history
  • Loading branch information
at-dro committed Apr 3, 2022
1 parent 5103d89 commit f2afc47
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/release-geotool.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Create release

on:
workflow_dispatch:

jobs:
release:
name: Create release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Obtain version information
id: version
run: |
version=$(npm run env | grep 'npm_package_version=' | cut -d= -f2)
echo "::set-output name=version::${version}"
- name: Install npm packages
run: npm install
- name: Build dist
run: npm run build
- name: Create archives
run: |
name='geotool-${{ steps.version.outputs.version }}'
mkdir "$name"
cp -pr ./dist/* "./${name}/"
cp -p ./LICENSE "./${name}/"
cp -p ./README.md "./${name}/"
tar -czpf "${name}.tar.gz" "$name"
zip "${name}.zip" "$name"
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.version.outputs.version }}
draft: false
files: |
geotool-${{ steps.version.outputs.version }}.tar.gz
geotool-${{ steps.version.outputs.version }}.zip

0 comments on commit f2afc47

Please sign in to comment.