v1.0.0 release: tarball creation/installation, plugin symlink management, release management #11
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
# Copyright (C) 2020-2024 CERN and UCLouvain. | ||
# Licensed under the GNU Lesser General Public License (version 3 or later). | ||
# Created by: A. Valassi (Sep 2024) for the MG5aMC CUDACPP plugin. | ||
# Further modified by: A. Valassi (2024) for the MG5aMC CUDACPP plugin. | ||
name: Archiver | ||
on: | ||
push: | ||
tags: [ '*' ] | ||
jobs: | ||
archiver: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout_master | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: 'true' | ||
- name: create_tarball | ||
run: | | ||
echo "HOME is ${HOME}" | ||
echo "Current directory is $(pwd)" | ||
echo "Current branch is $(git branch --show-current)" | ||
.github/workflows/archiver.sh | ||
- name: release | ||
# See https://github.com/softprops/action-gh-release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
cudacpp.tar.gz | ||
VERSION.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: create_infodat | ||
run: | | ||
echo "HOME is ${HOME}" | ||
echo "Current directory is $(pwd)" | ||
echo "Current branch is $(git branch --show-current)" | ||
python3 .github/workflows/archiver.py version_info.dat | ||
mv version_info.dat ${HOME} | ||
- name: checkout_INFO | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: INFO | ||
- name: commit_infodat | ||
run: | | ||
echo "HOME is ${HOME}" | ||
echo "Current directory is $(pwd)" | ||
echo "Current branch is $(git branch --show-current)" | ||
ls | ||
mv ${HOME}/version_info.dat . | ||
ls | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
if [ -z "$(git status --porcelain version_info.dat)" ]; then | ||
echo "Nothing to commit" | ||
else | ||
echo "Commit and push version_info.dat" | ||
echo "Update version_info.dat" > msg.txt | ||
echo "" >> msg.txt | ||
git diff version_info.dat | tail --lines=+6 >> msg.txt | ||
git commit -F msg.txt version_info.dat | ||
git push | ||
fi |