chore(release): 0.1.494 #551
Workflow file for this run
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: Tag workflow | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
create-release: | |
name: Creating a release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.USER_TOKEN }} | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install node_modules | |
run: yarn | |
- name: Extract release data | |
id: get-release-data | |
run: | | |
echo "::set-output name=tag::${GITHUB_REF##*/}" | |
echo "::set-output name=file::${GITHUB_REPOSITORY#*/}-${GITHUB_REF##*/}" | |
- name: Generate Site | |
run: yarn generate | |
- name: Zip artifacts | |
run: zip -r ${{ steps.get-release-data.outputs.file }}.zip package.json CHANGELOG.md | |
- name: Create release | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.USER_TOKEN }} | |
tag_name: ${{ steps.get-release-data.outputs.tag }} | |
prerelease: ${{ contains(steps.get-release-data.outputs.tag, '-') }} | |
generate_release_notes: true | |
draft: false | |
files: | | |
${{ steps.get-release-data.outputs.file }}.zip | |
- name: scp upload to production site | |
run: sshpass -p ${{ secrets.PROD_PASS }} scp -o 'StrictHostKeyChecking no' -r public_html/ ${{ secrets.PROD_USER }}@${{ secrets.PROD_IP }}:~/ |