From 22e71a97bd4facd05ccc789a1f1a228f1555cfdd Mon Sep 17 00:00:00 2001 From: Jukka Svahn Date: Sun, 13 Oct 2019 00:29:42 +0300 Subject: [PATCH] Release workflow and workflow testing --- .editorconfig | 3 ++ .github/workflows/{main.yml => ci.yml} | 14 ++++++-- .github/workflows/release.yml | 49 ++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 2 deletions(-) rename .github/workflows/{main.yml => ci.yml} (53%) create mode 100644 .github/workflows/release.yml diff --git a/.editorconfig b/.editorconfig index 677e36e..402bd2f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,3 +7,6 @@ indent_size = 4 indent_style = space insert_final_newline = true trim_trailing_whitespace = true + +[*.yml] +indent_size = 2 diff --git a/.github/workflows/main.yml b/.github/workflows/ci.yml similarity index 53% rename from .github/workflows/main.yml rename to .github/workflows/ci.yml index 78a72b3..90d850b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,6 @@ on: [push] jobs: build: - runs-on: ubuntu-latest steps: @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..56b28d6 --- /dev/null +++ b/.github/workflows/release.yml @@ -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/create-release@v1.0.0 + 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/upload-release-asset@v1.0.0 + 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/upload-release-asset@v1.0.0 + 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