fix release yml #3
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
on: | |
push: | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build-extension: | |
name: 'Build Extension' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout Code' | |
uses: actions/checkout@v3 | |
- name: 'Run NPM Install' | |
run: npm install | |
- name: 'Run NPM Build' | |
run: npm run build | |
- name: 'Upload Build Artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: neet | |
path: dist/ | |
release-content: | |
name: 'GitHub Release' | |
runs-on: ubuntu-latest | |
needs: [ build-extension ] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: 'Download Extension Artifacts' | |
uses: actions/download-artifact@v3 | |
with: | |
name: neet | |
- name: "Test Artifact" | |
run: "ls -R" | |
- name: "Create Zip" | |
uses: thedoctor0/[email protected] | |
with: | |
filename: neet.zip | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: ${{github.event.head_commit.message}} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./neet.zip | |
asset_name: neet-${{ github.ref }}.zip | |
asset_content_type: application/zip |