Skip to content

Commit

Permalink
CI: add dummy CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlocsomor committed Jul 9, 2020
1 parent 706e4cb commit d149e5b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI

on:
push:
branches: [ master ]
tags: 'v*'

# Recommended here: https://github.com/bazelbuild/bazelisk/issues/88#issuecomment-625178467
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
test-linux:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Run tests
shell: bash
run: |
if [[ -f ./fail_the_tests ]]; then
echo 'Tests failed'
false
else
echo 'Tests passed'
fi
10 changes: 1 addition & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,25 @@ jobs:
uses: actions/checkout@v2
- name: Build release
run: |
echo "this is a release, commit hash=${{ github.sha }}" > out.txt
echo "this is another output" > out2.txt
echo "this is a release, commit hash=${{ github.sha }}" > out.txt && echo "this is another output" > out2.txt
shell: bash
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
body: Release ${{ github.ref }}
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload out.txt
#id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
# 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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out.txt
asset_name: out.txt
# Media type from: https://www.iana.org/assignments/media-types/media-types.xhtml#application
asset_content_type: text/plain
- name: Upload out2.txt
#id: upload-release-asset2
uses: actions/upload-release-asset@v1
with:
# 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
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./out2.txt
asset_name: out2.txt
Expand Down

0 comments on commit d149e5b

Please sign in to comment.