Skip to content

add youtube examples #3

add youtube examples

add youtube examples #3

Workflow file for this run

name: Release on Push
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install Dependencies
run: npm install
- name: Minify consenty.js
run: npx terser consenty.js -o consenty.min.js -c -m
- name: Commit minified file
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add consenty.min.js
git commit -m "Minify consenty.js" -a || echo "No changes to commit"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
- name: 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: ./consenty.min.js
asset_name: consenty.min.js
asset_content_type: application/javascript