Skip to content

Commit

Permalink
Merge branch 'schema-rewrite'
Browse files Browse the repository at this point in the history
  • Loading branch information
Investigamer committed Aug 11, 2024
2 parents 8de338d + 16c7151 commit 1daf4eb
Show file tree
Hide file tree
Showing 4,316 changed files with 4,740 additions and 8,498 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
51 changes: 0 additions & 51 deletions .github/workflows/build-all.yml

This file was deleted.

123 changes: 123 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Build Daily Release

on:
workflow_dispatch:
schedule:
# Scheduled Daily (Midnight)
- cron: '0 0 * * *'

jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout Repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

# Install Inkscape, XVFB, GitHub CLI
- name: Install Inkscape
run: |
sudo add-apt-repository ppa:inkscape.dev/stable
sudo apt-get install -y inkscape xvfb gh
# Use Python 3.12
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: '3.12'

# Install Node, NPM and SVGO
- name: Install Node / NPM
uses: actions/setup-node@v4
with:
node-version: 'latest'

# Install Pipx, Poetry and dependencies
- name: Install Poetry using pipx
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry
poetry config virtualenvs.in-project true
poetry install
poetry update
npm install
# Build Project and Commit Changes
- name: Build Project and Commit Changes
run: |
git pull --tags
poetry run vectors build .
git add .
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git commit -m "deps(build): Process daily updates."
git push
poetry run cz -nr 21,16 bump --yes
git push && git push --tags
# Generate release tag
- name: Generate Release Tag
id: generate_tag
run: |
VERSION=$(poetry version -s)
DATE=$(date +%Y%m%d)
DATE_FMT=$(date +'%Y-%m-%d')
echo "PROJECT_VERSION=${VERSION}" >> $GITHUB_ENV
echo "DATE_FMT=${DATE_FMT}" >> $GITHUB_ENV
echo "VERSION_TAG=v${VERSION}+${DATE}" >> $GITHUB_ENV
# Publish Release
- name: Publish Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION_TAG }}
release_name: ${{ env.VERSION_TAG }}
body: "## Daily Build (${{ env.DATE_FMT }})
This is an automated daily release that ingests changes to the SVG catalog and live Scryfall data. A new
release does not mean the codebase has changed. The version tag for automated releases and the manifest file
is comprised of the codebase version + the day this release was generated in `YYYYMMDD` format.
### Release Files
Two packages are provided, the `all` package contains both the original SVG files and the optimized
versions. The `optimized` package only contains the optimized SVG files. Both packages include a
`manifest.json` file which provides helpful compatibility and routing data. Generally, the optimized
SVG files are recommended for production use, typically saving about 30-50% in filesize and providing
improved formatting compatibility accross use cases.
### Changelog
See the automated [changelog](https://github.com/Investigamer/mtg-vectors/blob/main/CHANGELOG.md) to view
the full history of the codebase."
draft: false
prerelease: false

# Upload Release Package (All)
- name: Upload Release Package (All)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mtg-vectors.all.zip
asset_name: mtg-vectors.all.zip
asset_content_type: application/zip

# Upload Release Package (Optimized)
- name: Upload Release Package (Optimized)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mtg-vectors.optimized.zip
asset_name: mtg-vectors.optimized.zip
asset_content_type: application/zip
86 changes: 0 additions & 86 deletions .github/workflows/optimize-svgs.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,5 @@ node_modules
# Pycharm
.idea

mtg-vectors.*.zip
manifest.json
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
## v0.6.9 (2024-07-11)
## v0.6.11 (2024-07-27)

### Refactor

- **svg**: Add repaired symbols
- **svg**: Temporarily remove anomalous symbols

## v0.6.10 (2024-07-27)

### Refactor

- **workflows**: Update formatting of release body
- **git**: Ensure manifest isn't committed to repo
- **naming**: Re-add properly named symbols which encountered filename issue
- **naming**: Remove optimized symbols to fix naming issue with git

## v0.6.9 (2024-07-25)

### Refactor

- **svg**: Remove eroneous files
- **workflows**: Minor tweaks
- **commands**: Update commands and command utilities using new schema system, data files, and build system
- **symbols,schema**: Rework set symbol utilities using new schema structures, remove deprecated files
- **watermarks**: Rework watermark utilities
- **github**: Deprecate unneeeded workflow, update build workflow
- **data**: Major rework of data files, deprecate files no longer needed
- **cleanup**: Remove unnecessary files and generate new docs
- **svg**: Relocate unused symbols, add new optimized symbols path
- **utils**: Minor refactoring
- **routes**: Commit final update before planning deprecation of manual routes

Expand Down
Loading

0 comments on commit 1daf4eb

Please sign in to comment.