Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
supertommy authored May 17, 2020
1 parent 864ceb1 commit b42be6b
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: CI

on: [push]
on:
push:
branches: master

jobs:
build:
Expand All @@ -12,6 +14,11 @@ jobs:
uses: actions/checkout@master
with:
lfs: true
- name: Create zip
uses: thedoctor0/zip-release@master
with:
filename: SourceWithAssets.zip
exclusions: '*.git*'

- name: Install Parcel
run: npm install parcel-bundler
Expand All @@ -29,3 +36,33 @@ jobs:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist
CLEAN: true

- name: Delete Previous latest Release
uses: author/action-rollback@stable
with:
# Using a tag name
tag: 'latest'
env:
GITHUB_TOKEN: ${{ secrets.GHP_TOKEN }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GHP_TOKEN }}
with:
tag_name: 'latest'
release_name: 'latest'
draft: false
prerelease: false

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GHP_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./SourceWithAssets.zip
asset_name: SourceWithAssets.zip
asset_content_type: application/zip

0 comments on commit b42be6b

Please sign in to comment.