Skip to content

Commit

Permalink
rename ruby action to test-patterns - add create release and upload r…
Browse files Browse the repository at this point in the history
…elease asset actions to bundle up the json files
  • Loading branch information
sckott committed Aug 14, 2020
1 parent 9581146 commit 9cee5dd
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Create Release

on:
push:
tags:
- 'v*'

jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: ${{ github.ref }}
draft: false
prerelease: false
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Ruby
name: test patterns

on:
push:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/upload-release-asset.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Upload Release Asset

on:
push:
tags:
- 'v*'

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Build project
run: |
zip --junk-paths pubpatterns src/*
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: 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: ./pubpatterns.zip
asset_name: pubpatterns.zip
asset_content_type: application/zip

0 comments on commit 9cee5dd

Please sign in to comment.