Skip to content

Commit

Permalink
Added ci yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tzoug authored Feb 26, 2022
1 parent 89e78ed commit 76067dd
Showing 1 changed file with 57 additions and 17 deletions.
74 changes: 57 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,66 @@
name: "tagged-release"
name: ThingiZIP Release

on:
push:
branches:
- main
# Sequence of patterns matched against refs/tags
tags:
- "v*"

- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
tagged-release:
name: "Tagged Release"
runs-on: "ubuntu-latest"

build:
runs-on: ubuntu-latest
name: Build
steps:
- name: "Build & test"
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: cd build && ./build.sh
- uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
files: |
cd build/output
*.zip
*.crx
*.xpi
- name: Upload Chrome ZIP Asset
id: upload-chrome-zip-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_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: ./output/ThingiZIP-chrome.zip
asset_name: ThingiZIP-chrome.zip
asset_content_type: application/zip
- name: Upload Chrome CRX Asset
id: upload-chrome-crx-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_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: ./output/ThingiZIP-chrome.crx
asset_name: ThingiZIP-chrome.crx
asset_content_type: application/zip
- name: Upload Firefox ZIP Asset
id: upload-firefox-zip-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_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: ./output/ThingiZIP-firefox.zip
asset_name: ThingiZIP-firefox.zip
asset_content_type: application/zip
- name: Upload Chrome XPI Asset
id: upload-firefox-xpi-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_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: ./output/ThingiZIP-firefox.xpi
asset_name: ThingiZIP-firefox.xpi
asset_content_type: application/zip

0 comments on commit 76067dd

Please sign in to comment.