Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
92bb97b
empty (#119)
jordanbean-msft Jul 31, 2023
23fdc5c
Test actions (#121)
jordanbean-msft Jul 31, 2023
b6297a1
Merge branch 'microsoft:master' into master
jordanbean-msft Oct 2, 2023
a993852
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Oct 10, 2023
0d54a3e
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Oct 12, 2023
72d592e
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Nov 21, 2023
c034d40
releaser
jordanbean-msft Nov 21, 2023
4ee714f
releasers
jordanbean-msft Nov 21, 2023
0bc72e8
Jordanbean msft/releaser (#124)
jordanbean-msft Nov 21, 2023
ca74355
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Nov 21, 2023
edcb894
readme
jordanbean-msft Nov 21, 2023
1b74064
push
jordanbean-msft Nov 21, 2023
9c80731
Jordanbean msft/releaser (#125)
jordanbean-msft Nov 21, 2023
b82c1c2
asdf
jordanbean-msft Nov 21, 2023
0d050c9
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Nov 21, 2023
ef6b377
Merge branch 'master' into release
jordanbean-msft Nov 21, 2023
83cc962
asdf
jordanbean-msft Nov 21, 2023
8f1f351
Merge branch 'master' into jordanbean-msft/releaser
jordanbean-msft Nov 21, 2023
b30a75a
ignore
jordanbean-msft Nov 21, 2023
6c9297c
Jordanbean msft/releaser (#126)
jordanbean-msft Nov 21, 2023
a7ee769
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Nov 21, 2023
33d886e
Merge branch 'master' into release
jordanbean-msft Nov 21, 2023
6522fb0
readme
jordanbean-msft Nov 21, 2023
84a82df
Merge branch 'master' into jordanbean-msft/releaser
jordanbean-msft Nov 21, 2023
fad9b2e
deltee
jordanbean-msft Nov 21, 2023
c7c15ea
Jordanbean msft/releaser (#127)
jordanbean-msft Nov 21, 2023
721c47b
Merge branch 'master' of github.com:jordanbean-msft/WhatTheHack
jordanbean-msft Nov 21, 2023
7b6c05b
Merge branch 'master' into release
jordanbean-msft Nov 21, 2023
32011b1
release
jordanbean-msft Nov 21, 2023
06903e0
true
jordanbean-msft Nov 21, 2023
2888d36
readme
jordanbean-msft Nov 21, 2023
528a453
release
jordanbean-msft Nov 21, 2023
09cd2ab
array
jordanbean-msft Nov 21, 2023
a4548b1
matrix
jordanbean-msft Nov 21, 2023
b1b8989
trim
jordanbean-msft Nov 21, 2023
c1f5432
trim
jordanbean-msft Nov 21, 2023
19894fd
tag
jordanbean-msft Nov 21, 2023
3ceffdd
continue
jordanbean-msft Nov 21, 2023
538ffd7
release
jordanbean-msft Nov 21, 2023
43bfd5b
release
jordanbean-msft Nov 21, 2023
f8acee7
release
jordanbean-msft Nov 21, 2023
601273d
exit code
jordanbean-msft Nov 22, 2023
178f58d
return
jordanbean-msft Nov 22, 2023
7143b3b
naming
jordanbean-msft Nov 22, 2023
541e350
asdf
jordanbean-msft Nov 22, 2023
cb95485
naming
jordanbean-msft Nov 22, 2023
8946f4e
tag
jordanbean-msft Nov 22, 2023
18e03f1
tag
jordanbean-msft Nov 22, 2023
544cb47
asdf
jordanbean-msft Nov 22, 2023
291a6b8
2 files
jordanbean-msft Nov 22, 2023
87160ac
releaser
jordanbean-msft Nov 22, 2023
091726b
Delete .github/workflows/create-new-hack-openai.yml
jordanbean-msft Dec 4, 2023
d0a4636
subdir
jordanbean-msft Dec 18, 2023
668cc49
Merge branch 'jordanbean-msft/releaser' of github.com:jordanbean-msft…
jordanbean-msft Dec 18, 2023
ad73b67
intro
jordanbean-msft Dec 18, 2023
4d26070
intro
jordanbean-msft Dec 18, 2023
eaa7cc4
release
jordanbean-msft Dec 18, 2023
3bb897d
Merge branch 'jordanbean-msft/releaser' into release
jordanbean-msft Dec 18, 2023
41a1139
empty
jordanbean-msft Dec 18, 2023
f22d819
warning
jordanbean-msft Dec 18, 2023
8a6389c
nothing
jordanbean-msft Dec 18, 2023
778098b
release
jordanbean-msft Dec 18, 2023
78bf44c
rlease
jordanbean-msft Dec 18, 2023
84ceb67
releaser
jordanbean-msft Dec 18, 2023
d4b515d
removing settings
jordanbean-msft Dec 18, 2023
c9d3aac
branch
jordanbean-msft Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/create-wth-release-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Create a WTH Release - Common

on:
workflow_call:
inputs:
hackathonNames:
description: "The name of the hackathon to create a release for"
required: true
type: string
pathToStudentResources:
description: "The path to the Student Resources directory."
required: true
type: string
branchName:
description: "The name of the branch to create the release from."
required: true
type: string

jobs:
package:
strategy:
matrix:
hackathonName: ${{ fromJSON(inputs.hackathonNames) }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: echo "TAG=${{ matrix.hackathonName }}" >> $GITHUB_ENV
name: Set tag
- run: |
OUTPUT=0
gh release view ${{ env.TAG }} || OUTPUT=$?
if [[ $OUTPUT -ne 0 ]]; then
echo "Release not found, continuing..."
else
echo "Release found, deleting..."
gh release delete ${{ env.TAG }} --cleanup-tag --yes
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Delete ${{ env.TAG }} release if it exists
- run: |
cd ${{ matrix.hackathonName }}/${{ inputs.pathToStudentResources }}
zip -r ${{ env.RESOURCES_FILENAME }} *

gh release create ${{ env.TAG }} \
--title "Student Resources for ${{ matrix.hackathonName }}" \
--notes "Student Resources for ${{ matrix.hackathonName }}" \
--target ${{ inputs.branchName }}

gh release upload ${{ env.TAG }} ${{ env.RESOURCES_FILENAME }}.zip

gh release edit ${{ env.TAG }} --draft=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RESOURCES_FILENAME: Resources
name: Create ${{ env.TAG }} release
44 changes: 44 additions & 0 deletions .github/workflows/create-wth-release-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Create a WTH Release - Push

on:
push:
branches:
- master

jobs:
determine-changed-hackathon:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
all_changed_hackathons: ${{ steps.convert-to-json-array.outputs.all_changed_hackathons }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get changed hackathons
id: changed-hackathon-directories
uses: tj-actions/changed-files@25ef3926d147cd02fc7e931c1ef50772bbb0d25d
with:
dir_names: true
dir_names_exclude_current_dir: true
dir_names_max_depth: 1
files:
'**/Student/Resources/**'
files_ignore: |
.github/**
000-HowToHack/**
_layouts/**
_assets/**
- name: Convert space-separated string to JSON array
id: convert-to-json-array
run: |
JSON_ARRAY=$(echo ${{ steps.changed-hackathon-directories.outputs.all_changed_files }} | tr -d '\n' | jq -R -s -c 'split(" ")')
echo "all_changed_hackathons=$JSON_ARRAY" >> $GITHUB_OUTPUT
package:
needs: determine-changed-hackathon
if: ${{ needs.determine-changed-hackathon.outputs.all_changed_hackathons != '[]' }}
uses: ./.github/workflows/create-wth-release-common.yml
with:
hackathonNames: ${{ needs.determine-changed-hackathon.outputs.all_changed_hackathons }}
pathToStudentResources: 'Student/Resources'
branchName: release
41 changes: 41 additions & 0 deletions .github/workflows/create-wth-release-workflow_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Create a WTH Release - Manual

on:
workflow_dispatch:
inputs:
hackathonName:
description: "The name of the hackathon to create a release for"
required: true
default: "001-IntroToKubernetes"
pathToStudentResources:
description: "The path to the Student Resources directory."
required: true
default: "Student/Resources"
branchName:
description: "The name of the branch to create the release from."
required: true
default: "master"

jobs:
determine-changed-hackathon:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
all_changed_hackathons: ${{ steps.convert-to-json-array.outputs.all_changed_hackathons }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Convert space-separated string to JSON array
id: convert-to-json-array
run: |
JSON_ARRAY=$(echo ${{ inputs.hackathonName }} | tr -d '\n' | jq -R -s -c 'split(" ")')
echo "::set-output name=all_changed_hackathons::$JSON_ARRAY"
package:
needs: determine-changed-hackathon
uses: ./.github/workflows/create-wth-release-common.yml
with:
hackathonNames: ${{ needs.determine-changed-hackathon.outputs.all_changed_hackathons }}
pathToStudentResources: ${{ inputs.pathToStudentResources }}
branchName: ${{ inputs.branchName }}

40 changes: 0 additions & 40 deletions .github/workflows/create-wth-release.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,6 @@ ASALocalRun/
.mfractor/
.DS_Store

.env
.env

.vscode/
8 changes: 5 additions & 3 deletions 000-HowToHack/WTH-HowToHostAHack.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ You should also upload both the Event Kickoff presentation and any lecture prese

##### Student Resources export tool

You can use the **Create a release for a WhatTheHack hackathon** GitHub Action to make it easier to export just the `Student/Resources` directory as a ZIP file. This will create a release in the repo with the ZIP file as an asset. You can then download the ZIP file and upload it to the General channel's Files tab.
Many hacks will already have a GitHub Release ZIP file which includes the hack's `Student/Resources` directory. You can use this ZIP file directly if you don't need to make any changes to the hack (a GitHub Action will create this ZIP file on each push to the `master` branch, so the ZIP file should be up-to-date with the latest changes).

![releases-resources-zip-file](images/releases-resources-zip-file.png)

If the ZIP file doesn't exist or you need to make changes to the content in the repo, you can use the **Create a WTH Release - Manual** GitHub Action to make it easier to export just the `Student/Resources` directory as a ZIP file. This will create a release in the repo with the ZIP file as an asset. You can then download the ZIP file and upload it to the General channel's Files tab.

Here are the steps to use the tool to export the Student Resources:

Expand All @@ -227,8 +231,6 @@ Here are the steps to use the tool to export the Student Resources:
1. Expand the **Assets** section.
1. Click on the **Resources.zip** file to download it.

![releases-resources-zip-file](images/releases-resources-zip-file.png)

#### Shared Tips/Wiki (Optional)

During a What The Hack event, attendees are strongly encouraged to share knowledge and learn from each other. Knowledge sharing is encouraged across the entire event, including between squads.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.