diff --git a/.github/workflows/prepare_newsletter.yml b/.github/workflows/prepare_newsletter.yml new file mode 100644 index 000000000..5a7b31fc9 --- /dev/null +++ b/.github/workflows/prepare_newsletter.yml @@ -0,0 +1,28 @@ +name: Prepare a new newsletter + +on: workflow_dispatch + +jobs: + prepare_new_newsletter: + runs-on: ubuntu-latest + env: + # https://github.com/crazy-max/ghaction-github-pages/issues/1#issuecomment-623202206 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + - name: copy template and adapt dates and ids. + run: echo y | ./scripts/prepare_newsletter.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: create branch and commit + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git checkout -B _gh_action_ci_prepare_newletter + git add . + git commit -m "new newsletter" + git push -f origin _gh_action_ci_prepare_newletter + - name: create pull request + run: gh pr create -B source -H _gh_action_ci_prepare_newletter --title 'Prepare new newsletter' --body 'Created by Github action' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/content/news/050/index.md b/content/news/050/index.md new file mode 100644 index 000000000..8ace79f7e --- /dev/null +++ b/content/news/050/index.md @@ -0,0 +1,135 @@ ++++ +title = "This Month in Rust GameDev #50 - {TODO_month} {TODO_day}" +transparent = true +date = {TODO_date} +draft = true ++++ + + + + + +Welcome to the 50th issue of the Rust GameDev Workgroup's +monthly newsletter. +[Rust] is a systems language pursuing the trifecta: +safety, concurrency, and speed. +These goals are well-aligned with game development. +We hope to build an inviting ecosystem for anyone wishing +to use Rust in their development process! +Want to get involved? [Join the Rust GameDev working group!][join] + +You can follow the newsletter creation process +by watching [the coordination issues][coordination]. +Want something mentioned in the next newsletter? +[Send us a pull request][pr]. +Feel free to send PRs about your own projects! + +[Rust]: https://rust-lang.org +[join]: https://github.com/rust-gamedev/wg#join-the-fun +[pr]: https://github.com/rust-gamedev/rust-gamedev.github.io +[coordination]: https://github.com/rust-gamedev/rust-gamedev.github.io/issues?q=label%3Acoordination + +- [Announcements](#announcements) +- [Game Updates](#game-updates) +- [Engine Updates](#engine-updates) +- [Learning Material Updates](#learning-material-updates) +- [Tooling Updates](#tooling-updates) +- [Library Updates](#library-updates) +- [Popular Workgroup Issues in Github](#popular-workgroup-issues-in-github) +- [Other News](#other-news) +- [Meeting Minutes](#meeting-minutes) +- [Discussions](#discussions) +- [Requests for Contribution](#requests-for-contribution) +- [Jobs](#jobs) +- [Bonus](#bonus) + + + +## Announcements + +## Game Updates + +## Engine Updates + +## Learning Material Updates + +## Tooling Updates + +## Library Updates + +## Popular Workgroup Issues in Github + + + +## Other News + + + +## Meeting Minutes + + + +[See all meeting issues][label_meeting] including full text notes +or [join the next meeting][join]. + +[label_meeting]: https://github.com/rust-gamedev/wg/issues?q=label%3Ameeting + +## Discussions + + + +## Requests for Contribution + + + +## Jobs + + + +## Bonus + + + +------ + +That's all news for today, thanks for reading! + +Want something mentioned in the next newsletter? +[Send us a pull request][pr]. + +Also, subscribe to [@rust_gamedev on Twitter][@rust_gamedev] +or [/r/rust_gamedev subreddit][/r/rust_gamedev] if you want to receive fresh news! + + + +[/r/rust_gamedev]: https://reddit.com/r/rust_gamedev +[@rust_gamedev]: https://twitter.com/rust_gamedev diff --git a/newsletter-template.md b/newsletter-template.md index 831ecd123..491d9de16 100644 --- a/newsletter-template.md +++ b/newsletter-template.md @@ -1,7 +1,7 @@ +++ -title = "This Month in Rust GameDev #{TODO} - {TODO} {TODO}" +title = "This Month in Rust GameDev #{TODO_id} - {TODO_month} {TODO_day}" transparent = true -date = TODO +date = {TODO_date} draft = true +++ @@ -9,7 +9,7 @@ draft = true -Welcome to the {TODO}th issue of the Rust GameDev Workgroup's +Welcome to the {TODO_id}th issue of the Rust GameDev Workgroup's monthly newsletter. [Rust] is a systems language pursuing the trifecta: safety, concurrency, and speed. @@ -35,8 +35,8 @@ Feel free to send PRs about your own projects! - [Learning Material Updates](#learning-material-updates) - [Tooling Updates](#tooling-updates) - [Library Updates](#library-updates) -- [Other News](#other-news) - [Popular Workgroup Issues in Github](#popular-workgroup-issues-in-github) +- [Other News](#other-news) - [Meeting Minutes](#meeting-minutes) - [Discussions](#discussions) - [Requests for Contribution](#requests-for-contribution) diff --git a/scripts/prepare_newsletter.sh b/scripts/prepare_newsletter.sh new file mode 100755 index 000000000..fc8b70e1e --- /dev/null +++ b/scripts/prepare_newsletter.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# This scripts parses existing news, and copies the newsletter template +# alongside the others, with its incremented id number. +# This script also replaces the TODOs related to the news id number. + +set -v + +read -r -d '\n' -a news <<< `find content/news/ -type d -printf "%f\n"| sort -n` + +last_news=`echo ${news[-1]} | sed -r s/0//` +news_to_create_simple=`echo $((last_news+1))` + +printf %03d $news_to_create_simple + +news_to_create=$(printf %03d $news_to_create_simple) + +echo $news_to_create +read -e -p "Do you want to create issue $news_to_create? (y/n): " choice + +[[ "$choice" != [Yy]* ]] && exit + +echo "accepted $news_to_create" + +new_file=`echo "content/news/$news_to_create/index.md"` + +echo $new_file + +mkdir -p content/news/$news_to_create && cp newsletter-template.md $new_file + +sed -i 's/{TODO_id}/'$news_to_create_simple'/g' $new_file \ No newline at end of file