Union Potentials in HPMC #4558
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit `release.yml` in `.github/workflows/templates` and run `make_workflows.py` to update the | |
# workflow. | |
name: GitHub Release | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
# Trigger on pull requests. | |
pull_request: | |
# Trigger on pushes to the trunk branches. This prevents building commits twice when the pull | |
# request source branch is in the same repository. | |
push: | |
branches: | |
- "trunk-*" | |
# Trigger on tags. Tag builds create GitHub releases with the change log and source tarball. | |
tags: | |
- "v*" | |
# Trigger on request. | |
workflow_dispatch: | |
env: | |
name: hoomd | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release: | |
name: Build release tarball | |
runs-on: ubuntu-latest | |
container: | |
image: glotzerlab/ci:2023.10.09-ubuntu20.04 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
submodules: true | |
path: code | |
- name: Determine last tag via git describe | |
if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} | |
run: echo "tag=$(git describe --abbrev=0)" >> $GITHUB_ENV | |
working-directory: code | |
# git describe does not return the current tag in tag pushes on GitHub Actions, use GITHUB_REF instead | |
- name: Determine tag from GITHUB_REF | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: echo "tag=$(echo ${GITHUB_REF} | sed -e 's/refs\/tags\///g')" >> $GITHUB_ENV | |
- name: Write version change log | |
run: .github/workflows/make-changelog-md.sh ${tag:1} | tee ${GITHUB_WORKSPACE}/changelog.md | |
working-directory: code | |
- name: Copy source | |
run: cp -R code ${name}-${tag:1} | |
- name: Remove .git | |
run: rm -rf ${name}-${tag:1}/.git && ls -laR ${name}-${tag:1} | |
- name: Tar source | |
run: tar -cvzf ${name}-${tag:1}.tar.gz ${name}-${tag:1} | |
- name: Upload release files | |
uses: actions/[email protected] | |
with: | |
name: release | |
path: | | |
*.tar.gz | |
changelog.md | |
publish: | |
name: Publish [GitHub] | |
needs: [release] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
name: release | |
- name: Create release | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/v') | |
with: | |
files: "*.tar.gz" | |
body_path: changelog.md | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |