Skip to content

Create and Commit Assets Archive #18

Create and Commit Assets Archive

Create and Commit Assets Archive #18

name: Create and Commit Assets Archive
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Extract release version
run: |
VERSION_FILE=$(ls src/autostart/version-*.txt)
RELEASE_VERSION=$(echo "$VERSION_FILE" | grep -oP '(?<=version-).*?(?=\.txt)')
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- name: Generate assets
run: |
tar -czvf tails-autostart.tar.gz -C src . --transform 's,^\./,tails-autostart/,'
- name: Create assets directory
run: |
mkdir -p assets
- name: Move archive to assets folder
run: |
mv tails-autostart.tar.gz assets/
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions@users.noreply.github.com"
- name: Commit and push changes
run: |
git add assets/*
git commit -m "Add/update asset tails-autostart.tar.gz release ${{ env.RELEASE_VERSION }}"
git push