Skip to content

Commit

Permalink
fix tag_name... dry dry
Browse files Browse the repository at this point in the history
  • Loading branch information
abessette committed Sep 1, 2021
1 parent 489ae98 commit a08e56b
Showing 1 changed file with 24 additions and 37 deletions.
61 changes: 24 additions & 37 deletions .github/workflows/main.yml
Expand Up @@ -98,49 +98,36 @@ jobs:
- name: Checkout the repo
uses: actions/checkout@v2

- name: Install virtual environment
run: python -m venv ./mag-venv

- name: Useful echo of the github obj
id: echo_github_object
env:
GITHUB_CONTEXT_TO_JSON: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT_TO_JSON"
- name: Activate virtual env
run: export PATH="$VIRTUAL_ENV:$PATH"

- name: Install python modules
run: pip install -r requirements.txt --upgrade

- name: display tar name
- name: Init data
run: |
echo $TAR_NAME
python manage.py migrate
python manage.py shell << EOF
from scm.demo_items import create_test_is
create_test_is()
EOF
- name: Create tar and gzip it
run: |
tar -cvf $TAR_NAME ../MAGE
gzip -k9 $TAR_NAME
env:
TAR_NAME: mage_${{ github.release.tag_name }}.tar

# - name: Install virtual environment
# run: python -m venv ./mag-venv
#
# - name: Activate virtual env
# run: export PATH="$VIRTUAL_ENV:$PATH"
#
# - name: Install python modules
# run: pip install -r requirements.txt --upgrade
#
# - name: Init data
# run: |
# python manage.py migrate
# python manage.py shell << EOF
# from scm.demo_items import create_test_is
# create_test_is()
# EOF
#
# - name: Create tar and gzip it
# run: |
# tar -cvf $TAR_NAME ../MAGE
# gzip -k9 $TAR_NAME
# env:
# TAR_NAME: mage_${{ github.release.tag_name }}.tar
TAR_NAME: mage_${{ github.event.release.tag_name }}.tar

# action softprops/action-gh-release@v1 substitute to
# actions/upload-release-asset@v1 (which is currently archived)
# - name: Upload Release Asset
# uses: softprops/action-gh-release@v1
# with:
# files: ./mage_${{github.release.tag_name}}.tar.gz
# tag_name: ${{github.release.tag_name}}
- name: Upload Release Asset
uses: softprops/action-gh-release@v1
with:
files: ./mage_${{github.release.tag_name}}.tar.gz
tag_name: ${{github.release.tag_name}}


0 comments on commit a08e56b

Please sign in to comment.