Skip to content

Commit

Permalink
pipeline: add workflows for all release channels
Browse files Browse the repository at this point in the history
  • Loading branch information
zeevallin committed Dec 19, 2020
1 parent 83c4d3b commit 8274b2f
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 10 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/alpha.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
tags:
- "v*.*.*-alpha.*" # push events matching i.e. v9.0.3-alpha.1

name: Alpha Release
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract version from reference
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build project into an archive
run: |
git archive --format zip --prefix Loot/ --output ./Loot@${{ steps.version.outputs.VERSION }}.zip HEAD
- name: Create release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
- name: Attach assets to GitHub release
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 }} # 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: ./Loot@${{ steps.version.outputs.VERSION }}.zip
asset_name: Loot@${{ steps.version.outputs.VERSION }}.zip
asset_content_type: application/zip
39 changes: 39 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
tags:
- "v*.*.*-beta.*" # push events matching i.e. v9.0.3-beta.1

name: Beta Release
jobs:
build:
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract version from reference
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build project into an archive
run: |
git archive --format zip --prefix Loot/ --output ./Loot@${{ steps.version.outputs.VERSION }}.zip HEAD
- name: Create release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
- name: Attach assets to GitHub release
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 }} # 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: ./Loot@${{ steps.version.outputs.VERSION }}.zip
asset_name: Loot@${{ steps.version.outputs.VERSION }}.zip
asset_content_type: application/zip
18 changes: 8 additions & 10 deletions .github/workflows/releases.yml → .github/workflows/stable.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,33 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10

name: Upload Release Asset
- "v*.*.*-stable.*" # push events matching i.e. v9.0.3-stable.1

name: Stable Release
jobs:
build:
name: Upload Release Asset
name: Build Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Extract version
- name: Extract version from reference
id: version
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: Build project # This would actually build your project, using zip for an example artifact
- name: Build project into an archive
run: |
git archive --format zip --prefix Loot/ --output ./Loot@${{ steps.version.outputs.VERSION }}.zip HEAD
- name: Create Release
- name: Create release on GitHub
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
draft: true
prerelease: false
- name: Upload Release Asset
- name: Attach assets to GitHub release
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
Expand Down

0 comments on commit 8274b2f

Please sign in to comment.