Unverified Commit 66ac00b8 authored by RobLoach's avatar RobLoach Committed by GitHub
Browse files

Create release-tarball.yml

parent b3a479b7
# This is a basic workflow to help you get started with Actions
name: Create Release
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
# Sequence of patterns matched against refs/tags
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
# This workflow contains a single job called "build"
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Check out the source
uses: actions/checkout@v2
submodules: true
- name: Set release tarball name
run: echo ::set-env name=TARBALL_NAME::$(echo cp2k-${GITHUB_REF##*/v}.tar.bz2)
- name: Install prerequisites
run: |
pip install git-archive-all
- name: Build release tarball
run: |
mkdir -p dist/
~/.local/bin/git-archive-all ./dist/${TARBALL_NAME}
- name: Create Release Draft
id: create_release
uses: actions/create-release@v1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
tag_name: ${{ github.ref }}
release_name: ChaiLove ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
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: ./dist/${{ env.TARBALL_NAME }}
asset_name: ${{ env.TARBALL_NAME }}
asset_content_type: application/x-gtar
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment