Skip to content

Commit

Permalink
Release workflow and workflow testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gocom committed Oct 12, 2019
1 parent 4b4c8cb commit 22e71a9
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_size = 2
14 changes: 12 additions & 2 deletions .github/workflows/main.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
Expand All @@ -13,10 +12,21 @@ jobs:
uses: actions/checkout@v1

- name: Build
id: build
uses: gocom/action-textpattern-package-plugin@master

- name: Test
run: |
echo ${{ steps.build.outputs.compressed }}
- name: Upload Compressed Plugin Installer Artifact
uses: actions/upload-artifact@master
with:
name: compressed.txt
name: installer_zip.txt
path: ${{ github.workspace }}/packages/default/compressed

- name: Upload Uncompressed Plugin Installer Artifact
uses: actions/upload-artifact@master
with:
name: installer.txt
path: ${{ github.workspace }}/packages/default/uncompressed
49 changes: 49 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

on:
push:
tags:
- '*.*.*'

jobs:
build:
runs-on: ubuntu-latest

steps:

- name: Checkout code
uses: actions/checkout@v1

- name: Build
uses: gocom/action-textpattern-package-plugin@master

- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload Compressed Plugin Installer
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/packages/default/compressed
asset_name: installer_v${{ github.ref }}_zip.txt
asset_content_type: text/plain

- name: Upload Uncompressed Plugin Installer
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ github.workspace }}/packages/default/uncompressed
asset_name: installer_v${{ github.ref }}.txt
asset_content_type: text/plain

0 comments on commit 22e71a9

Please sign in to comment.