Skip to content

Commit

Permalink
Initial release.
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBackx committed Apr 24, 2022
0 parents commit 4f93ef2
Show file tree
Hide file tree
Showing 33 changed files with 4,016 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/aur.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Arch User Repository (AUR)

on:
push:
tags:
- "*"

jobs:
aur:
runs-on: ubuntu-latest
steps:
- name: Version
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
- name: Checkout
uses: actions/checkout@v2

- name: Changelog
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

- name: SHA256 Archive
id: checksum
run: |
export CHECKSUM=$(curl -Ls https://codeload.github.com/AndreasBackx/spotifatius/tar.gz/${{ steps.changelog_reader.outputs.version }} | sha256sum | awk '{print $1}')
echo "::set-output name=checksum::${CHECKSUM}"
- name: AUR Version Bump
run: |
export CHECKSUM=${{ steps.checksum.outputs.checksum }}
echo "Bumping version to ${{ steps.changelog_reader.outputs.version }}"
echo "Checksum: ${CHECKSUM}"
sudo rm -r */src || true
sudo git clean -dfx
git clone ssh://[email protected]/spotifatius.git ../aur
rm ../aur/* || true
cp templates/PKGBUILD ../aur/PKGBUILD
cp templates/.SRCINFO ../aur/.SRCINFO
cd ../aur
sed -i "s@{{PKG_VERSION}}@${{ steps.changelog_reader.outputs.version }}@g" PKGBUILD
sed -i "s@{{CHECKSUM}}@${CHECKSUM}@g" PKGBUILD
sed -i "s@{{PKG_VERSION}}@${{ steps.changelog_reader.outputs.version }}@g" .SRCINFO
sed -i "s@{{CHECKSUM}}@${CHECKSUM}@g" .SRCINFO
git config user.name "${{ github.event.head_commit.author.name }}"
git config user.email "${{ github.event.head_commit.author.email }}"
git add -A
git diff-index @ --exit-code --quiet || git commit -m "${{ steps.changelog_reader.outputs.version }}
${{ steps.changelog_reader.outputs.changes }}
https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
git push
22 changes: 22 additions & 0 deletions .github/workflows/cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Cargo Publish

on:
push:
tags:
- "*"

jobs:
cargo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Publish to crates.io
uses: katyo/publish-crates@v1
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
tags:
- "*"

env:
CARGO_TERM_COLOR: always

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Version
id: tag_name
run: |
echo ::set-output name=current_version::${GITHUB_REF#refs/tags/}
- name: Checkout
uses: actions/checkout@v2

- name: Changelog
id: changelog_reader
uses: mindsers/changelog-reader-action@v2
with:
version: ${{ steps.tag_name.outputs.current_version }}
path: ./CHANGELOG.md

- name: Install minimal stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --all-features

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
target/release/spotifatius
LICENSE
tag_name: ${{ steps.changelog_reader.outputs.version }}
release_name: Release ${{ steps.changelog_reader.outputs.version }}
body: ${{ steps.changelog_reader.outputs.changes }}
prerelease: ${{ steps.changelog_reader.outputs.status == 'prereleased' }}
draft: ${{ steps.changelog_reader.outputs.status == 'unreleased' }}
env:
GITHUB_TOKEN: ${{ github.token }}
92 changes: 92 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

# Created by https://www.toptal.com/developers/gitignore/api/rust,linux,macos,windows
# Edit at https://www.toptal.com/developers/gitignore?templates=rust,linux,macos,windows

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Rust ###
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.toptal.com/developers/gitignore/api/rust,linux,macos,windows

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.tabWidth": 2
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.0] - 2022-04-24
### Added
- Initial release.
Loading

0 comments on commit 4f93ef2

Please sign in to comment.