Update build-and-publish.yml #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish to GitHub Packages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build the project | |
run: | | |
mkdir -p output | |
echo "bbb" > output/test.txt | |
- name: Publish to GitHub Packages | |
run: | | |
cd output | |
# ファイルを tar でまとめてアップロード用のアーカイブにする場合 | |
tar -czvf my-package.tar.gz * | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload to GitHub Packages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: my-package | |
path: output/my-package.tar.gz |